Results 1 to 4 of 4
Discuss how to create a simple application that copy a file to another folder in iphone? at the Tools - Hackint0sh.org; i need to make a simple application that copies a file to another system folder ...
  1. #1
    Professional Array

    Join Date
    Aug 2007
    Posts
    71
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default how to create a simple application that copy a file to another folder in iphone?

    i need to make a simple application that copies a file to another system folder in iphone.
    my aim is to make a simple application that copies a empty sms.db file onto corrupted one. so when i have a problem with the sms.db i can clean it with that app.

    thanks in advance guys



  2. #2
    Rookie Array

    Join Date
    Sep 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I was doing something similiar in my project, here is the snippet of my code, original I was trying to use NSTask, but got some compile error, maybe you can give that a try. So eventually I just use the system() function.

    /** NSTask got a compile error.
    NSMutableArray *array = [NSMutableArray array];
    [array addObject:[_path stringByAppendingString:_lang]];
    [array addObject:_gpref];
    [[NSTask launchedTaskWithLaunchPath:@"/bin/cp"
    arguments:[NSArray array]] waitUntilExit];
    **/

    NSString *cmd = @"/bin/cp ";
    cmd = [cmd stringByAppendingString:_path];
    cmd = [cmd stringByAppendingString:[langDict objectForKey: _lang]];
    cmd = [cmd stringByAppendingString:@" "];
    cmd = [cmd stringByAppendingString:_gpref];
    cmd = [cmd stringByAppendingString:@"&& launchctl stop com.apple.SpringBoard"];

    NSLog(cmd);
    system([cmd UTF8String]);

  3. #3
    Professional Array

    Join Date
    Oct 2007
    Posts
    56
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    9

    Default

    Can't you use MobileFinder to do this?

    Cheers

  4. #4
    Professional Array

    Join Date
    Aug 2007
    Posts
    71
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    i can but what i need is a kind of batch file to do this

 

 

Similar Threads

  1. Windows XP - Hosts File - Simple Batch File
    By vikram in forum iPhone 3GS
    Replies: 3
    Last Post: 09-18-2009, 03:02 PM
  2. Developer needed for a simple iPhone application
    By TheMM in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 01-01-2009, 05:35 PM
  3. Replies: 1
    Last Post: 10-03-2007, 06:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 05:36 PM.
twitter, follow us!