Jump to content

renaming a hidden folder through xcode


1 post in this topic

Recommended Posts

Hi there. Sorry if i am posting in the wrong forum, i have this code for iPhone.

 

NSString *anotherPath = @"/private/var/mobile/Media/DCIM/.100APPLE";
NSString *anotherAnotherPath = @"/private/var/mobile/Media/DCIM/786APPLE";
NSFileManager *anotherManager = [[NSFileManager alloc] init];
if ([anotherManager fileExistsAtPath:anotherPath])
{
if ([anotherManager fileExistsAtPath:anotherAnotherPath] == NO)
{
if ([anotherManager moveItemAtPath:anotherPath toPath:anotherAnotherPath error:NULL])
{
}
else
{
	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Rename Failed" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
	[alert show];
	[alert release];
}
  }

}

[anotherManager release];

 

My problem is that i am having problem changing the name of the .100APPLE folder to 700APPLE inside /private/var/mobile/Media/DCIM, but i m getting permissions error, is there any work around for this?

Link to comment
Share on other sites

 Share

×
×
  • Create New...