Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

neil1234567

macrumors newbie
Original poster
Feb 22, 2013
1
0
My ipad app creates a CSV file that I want to copy into a windows pc at smb://windowssever/d$/myfolder.

My Windows PC needs an authetication that is it needs a username and password to connect.

I am using the following code to copy but not sure where should I give the username and password of PC in the following code.

Code:
NSFileManager *filemgr;
filemgr = [NSFileManager defaultManager];
if ([filemgr copyItemAtPath: @"/tmp/myfile.csv" toPath: @"smb://windowssever/d$/myfolder/myfile.csv" error: NULL]  == YES)
        NSLog (@"Copy successful");
else
        NSLog (@"Copy failed");
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.