Re: Replacing a character in a filename?
Re: Replacing a character in a filename?
- Subject: Re: Replacing a character in a filename?
- From: Ian Mantripp <email@hidden>
- Date: Fri, 24 Aug 2001 16:17:25 +0200
on 24/08/01 3:59 PM, T.J. Mahaffey wrote:
>
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. ;)
ok, here is just a hint then: AppleScript's text item delimiters
Happy hunting
Ian