• 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
Shortening Filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Checking for Running apps in X
  • Next by Date: Re: Counting the items in anested list
  • Previous by thread: Checking for Running apps in X
  • Next by thread: Scope of globals, parents and children, "load script" and all that jazz
  • Index(es):
    • Date
    • Thread