as I can move all files from one directory to another directory? I have my code so to move them individually, but I can not move them all.
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"user"];
if (![[NSFileManager defaultManager] fileExistsAtPath:dataPath])
[[NSFileManager defaultManager] createDirectoryAtPath:dataPath withIntermediateDirectories:NO attributes:nil error:&error];
NSString *oldPath = [NSString stringWithFormat:@"%@/user/%@", documentsDirectory, fileName];
NSLog(@"copia de aqui %@", oldPath);
NSString *newPath = [NSString stringWithFormat:@"%@/leidos/%@", documentsDirectory, fileName];
NSLog(@"aqui aqui %@", newPath);
[[NSFileManager defaultManager] moveItemAtPath:oldPath toPath:newPath error:nil];