Re: renaming directories and moving files into them (NSFileManager)
Re: renaming directories and moving files into them (NSFileManager)
- Subject: Re: renaming directories and moving files into them (NSFileManager)
- From: Ken Thomases <email@hidden>
- Date: Fri, 15 Apr 2011 01:05:21 -0500
On Apr 15, 2011, at 12:47 AM, Scott Anguish wrote:
> I have an app that sorts a bunch of files and sticks them in a newly made directories. When it finds a file that identifies WhereFroms (via spotlight, from a downloaded file) I want it to rename that directory and then copy the rest of the related files into that directory
For what it's worth, I didn't follow that.
> newShootPath=[shootPath stringByAppendingString:@“-APPL”];
> // make sure I’ve not already done this
> if (![self directoryExists:newShootPath]) {
>
> success=[fileManager moveItemAtPath:shootPath toPath:newShootPath error:&theError];
Why not log both shootPath and newShootPath right here, before the move? What does it show?
> It always creates a new directory wit the new name, in the existing shootPath directory (for example /tmp/boo/Friday) with Friday-APPL instead. and then copies the newly found files into that. I’m boggled.
Couldn't follow that, either, I'm afraid. Perhaps you should just give the explicit set of paths of files, directories, etc. and which you want moved/renamed from where to where, and which are actually being moved/renamed from where to where.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden