View topic - create directory on windows machine from QNX

create directory on windows machine from QNX

anything that doesn't fit to other groups.

create directory on windows machine from QNX

Postby rashidmirza » Tue Oct 25, 2011 10:34 am

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
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am

Re: create directory on windows machine from QNX

Postby mario » Tue Oct 25, 2011 2:40 pm

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
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: create directory on windows machine from QNX

Postby rashidmirza » Wed Oct 26, 2011 5:51 am

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.
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am

Re: create directory on windows machine from QNX

Postby mario » Wed Oct 26, 2011 12:00 pm

Sounds like a good approach to me.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: create directory on windows machine from QNX

Postby rashidmirza » Mon Oct 31, 2011 5:32 am

it works beautifully!
thanks
rashidmirza
Active Member
 
Posts: 55
Joined: Sun Jun 13, 2010 4:32 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 3 guests