Applescript help
Steve Mills
smills at multi-ad.com
Thu Apr 19 15:32:07 CDT 2007
On Apr 19, 2007, at 15:04:10, Strubinger, Ryan wrote:
> I am hoping for some help writing an applescript. I have never used
> applescript before, so I am traveling in uncharted waters here.
>
> We store our ads that we build with Creator in a folder structure on a
> server. There is a folder for every month and a folder for every day
> inside that and a set of folder inside of there. I have one folder
> structure created the way I want it. However, now, I want to take
> that
> folder structure into an applescript and change the first character of
> every folder name. For example, the folders are named 5-01-07 ,
> 5-02-07
> ... I want to change those to 6-01-07 , 6-02-07 ... . I tried using
> the Automator that is built into Tiger, but it doesn't allow me to
> just
> change the first character of a folder name, as far as I could tell.
I think OSX ships with a script to do this. Do you have the System
script menu turned on? If not, go to /Applications/AppleScript/ and
launch AppleScript Utility. Turn on "Show Script Menu in menu bar"
and "Show Library scripts". This will give you a script menu on the
right half of your menubar that you can access from any app. In it,
there should be a folder named Finder Scripts, and inside should be a
script named "Replace Text in Item Names". Just open the folder that
contains the folders you want to rename, choose that script, enter
the text to find and the text to replace, etc.
Wait, that blindly replaces the search text *everywhere* throughout
the item names. That's not what you want. There are 2 other scripts
in the same folder, "Trim Folder Names" and "Add to Folder Names".
Run them in that order, first removing the 6 from the front, than
adding the 7 to the front.
I know there are better scripts to do exactly what you want, and I
thought I had one, but I can't find it now. You could check the web,
places like macscripter.net.
_________________________________________________________
Steve Mills Me: 952-401-6255
Senior Software Architect MultiAd
smills at multiad.com www.multi-ad.com
More information about the Creator
mailing list