Shortening Filenames
Shortening Filenames
- Subject: Shortening Filenames
- From: List Guy <email@hidden>
- Date: Wed, 16 May 2001 13:56:30 -0700
Perhaps this example will help:
tell application "Finder" to set old_path to file "WWW:Internet
Mail:applescript-u
2 #681 - 15 msgs"
set old_name to (info for old_path)'s name
set new_name to text 4 thru -1 of old_name
(*
new_name -- returns "lescript-u
2 #681 - 15 msgs"
*)
tell application "Finder" to set name of old_path to new_name
You should write code that checks that the old_name is not too short prior
to deleting the first four characters.
grh