Copying a directory off a network drive using Objective-C/C

Posted by Jeff on Stack Overflow See other posts from Stack Overflow or by Jeff
Published on 2009-11-03T01:12:31Z Indexed on 2010/05/29 16:02 UTC
Read the original article Hit count: 794

Filed under:
|
|
|

Hi All, I'm trying to figure out a way for this to work:

NSString *searchCommand = [[NSString alloc] initWithFormat:@"cp -R /Volumes/Public/DirectoryToCopy* Desktop/"];

    const char* system_call = [searchCommand UTF8String];
    system(system_call);

The system() method does not acknowledge the specific string I am passing in. If I try something like:

system("kextstat");

No problems. Any ideas why the find string command I'm passing in is not working? All I get is "GDB: Running ....." in xCode. I should mention that if I try the same exact command in terminal it works just fine.

© Stack Overflow or respective owner

Related posts about c

    Related posts about objective-c