View topic - create directory on windows machine from QNX

Page 1 of 1

create directory on windows machine from QNX

PostPosted: Tue Oct 25, 2011 10:34 am
by rashidmirza
I am trying to make use of the mkdir() function, to create a directory via c programming on a network path which has a windows machine:
//ip_address/Shares

i have samba service running on the qnx box, therefore at the smb:\> prompt i can create a folder on the share folder.
I am quite sure, the issue, is that when programmatically when i try to create a folder using mkdir on the remote path, i am missing the username and password credentials.

How can i provide programmatically this information to my software?
Also i am able to mount the windows share folder, and i can view it in my QNX file manager.
I am providing the following, when i try to creat a directory:
S_IRWXU |S_IRWXG |S_IROTH | S_IWOTH

Re: create directory on windows machine from QNX

PostPosted: Tue Oct 25, 2011 2:40 pm
by mario
rashidmirza wrote:I am trying to make use of the mkdir() function, to create a directory via c programming on a network path which has a windows machine:
//ip_address/Shares

i have samba service running on the qnx box, therefore at the smb:\> prompt i can create a folder on the share folder.
I am quite sure, the issue, is that when programmatically when i try to create a folder using mkdir on the remote path, i am missing the username and password credentials.

How can i provide programmatically this information to my software?
Also i am able to mount the windows share folder, and i can view it in my QNX file manager.
I am providing the following, when i try to creat a directory:
S_IRWXU |S_IRWXG |S_IROTH | S_IWOTH


AFAIK you can't do it programmatically aside using system() to invoke to proper command

Re: create directory on windows machine from QNX

PostPosted: Wed Oct 26, 2011 5:51 am
by rashidmirza
at this stage, i am contemplating of using the common internet files system, and mounting the remote windows folder as a local folder, and giving the local path, as a argument to the mkdir function.
Not too sure at this stage if it will work.

Re: create directory on windows machine from QNX

PostPosted: Wed Oct 26, 2011 12:00 pm
by mario
Sounds like a good approach to me.

Re: create directory on windows machine from QNX

PostPosted: Mon Oct 31, 2011 5:32 am
by rashidmirza
it works beautifully!
thanks