我正在将文件移动到文件夹(文件存储在其他文件夹中),我通过提供文件名来移动它,但我想将存储在文件夹中的所有文件移动到其他文件夹。
我怎样才能做到这一点 ?
提前致谢。
-(void)MoveFilesToMyInBoxFolder:(NSString *)destfileName
{
NSString* fullPath = [[NSBundle mainBundle] pathForResource:[destfileName stringByDeletingPathExtension] ofType:@"xml"];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
if (!documentsDirectory) {
NSLog(@"ERROR:Documents directory not found!");
return;
}
我把这个方法称为
[self MoveFilesToMyInBoxFolder:@"QS-H02032011100717AM1.xml"];