Replacing a character in a filename?
Replacing a character in a filename?
- Subject: Replacing a character in a filename?
- From: "T.J. Mahaffey" <email@hidden>
- Date: Fri, 24 Aug 2001 08:59:58 -0500
Hi, folks!
I was hoping someone could give me a nudge with this:
on open theFiles
set theSpace to " " as text
repeat with thisFile in theFiles
if name of thisFile contains theSpace then
set theSpace to "_" as text
end if
end repeat
end open
I'd like my script to find spaces in a file name and replace them with
underscores. Of course, this doesn't work in it's current form. could
someone give me a hint, but not a complete script? I need to learn here. ;)
T.J. Mahaffey
email@hidden