You can use the following function to move all of your images for the new Path .
You need to pass just DirectoryPath Old and New
- (void)moveFileFromFolder:(NSString *)oldFolderPath toFolder:(NSString *)newFolderPath { NSFileManager *fileManager = [NSFileManager defaultManager]; NSArray *fileNames = [fileManager contentsOfDirectoryAtPath:oldFolderPath error:nil]; for (NSString *fileName in fileNames) { NSString * oldFilePath = [oldFolderPath stringByAppendingString:fileName]; NSString * newFilePath = [newFolderPath stringByAppendingString:fileName]; NSError *error = nil; [fileManager moveItemAtPath:oldFilePath toPath:newFilePath error:&error]; if (error) { NSLog(@"error = %@", [error description]); return; } } }
source share