• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rename nested folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Rename nested folders
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Rename nested folders (From: "Stranathan, Dan" <email@hidden>)
 >Re: Rename nested folders (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Rename nested folders
  • Next by Date: Re: Circle Slash on Applescript apps when copying with rsync
  • Previous by thread: Re: Rename nested folders
  • Next by thread: Re: Rename nested folders
  • Index(es):
    • Date
    • Thread