0
ファイルを別のフォルダに移動しています(ファイルは別のフォルダに保存されています)。ファイル名を付けて移動しますが、すべて移動しますファイル、rはあるフォルダに他のフォルダに保存されます。
どうすればいいですか?
ありがとうございます。ファイル名を指定せずにフォルダからファイルを読み込む方法
-(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;
}
私は、ディレクトリ内のすべてのアイテムのファイル名の配列を取得することができますNSFileManager
のcontentsOfDirectoryAtPath
方法を使用して
[self MoveFilesToMyInBoxFolder:@"QS-H02032011100717AM1.xml"];
ああ、お返事のためにお返事します – Sowmya
もしお手伝いしてもお答えできますか? – lukya