Re: Rename nested folders
Re: Rename nested folders
- Subject: Re: Rename nested folders
- From: Ed Stockly <email@hidden>
- Date: Wed, 21 May 2008 20:50:06 -0700
>> The slashes are folder delimiters; so he's getting a zip file
containing a folder named Manuscripts with a subfolder named 2008
with a subfolder named 091066, and you want to
instead have a top-level folder named Manuscripts-2008-091066.
That's not what the OP indicated. It sounds like they are simply
folders with forward slashes in their names. It may even be that they
need to be fixed because forward slashes may be used to delimit
directories on servers or shared volumes.
If that's the case then this fixes the names
------------------
set myFolder to choose folder
tell application "Finder"
set foldersToFix to every folder of entire contents of myFolder as
alias list
repeat with thisFolder in foldersToFix
set folderName to the name of thisFolder
set AppleScript's text item delimiters to "/"
set folderName to every text item of folderName
set AppleScript's text item delimiters to "-"
set folderName to folderName as text
set the name of thisFolder to folderName
end repeat
end tell
------------------
I'm not sure what the best way to .sit the folders is.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden