• 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
Re: Droplet to Rename Breaks Under Jaguar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Droplet to Rename Breaks Under Jaguar


  • Subject: Re: Droplet to Rename Breaks Under Jaguar
  • From: Timothy Bates <email@hidden>
  • Date: Thu, 12 Sep 2002 11:02:19 +1000

> Try this MINI script. I haven't tested it in a commercial
> environment but it seems to work fine here with Jaguar.
> on open fList
> repeat with f in fList
> tell app "Finder"
> set s to f's name & "-2"
> set f's name to s
> set f's creator type to "GKON"
> set f's file type to "JPEG"
> end
> end
> set fList to {}
> end

Just an FYI: one has to be careful with names in 10.X
In particular, the displayed name and suffix are different from the name. So
adding "-2" to the name of a file might cause

"Mypict.jpg-2" to happen when what you wanted was "Mypict-2.jpg"

A quick way to handle this is to deal with the name but check if it has a
suffix and then split on this. That can be effortful as well if people have
(as they are wont) files called myphoto.jpg.jpg.jpg

But then wants cleaning up anyhow. One thing that hit me then was finding
that I had a file called "myphoto.jpg" another called "myphoto.jpg.jpg" both
in the same folder, then when you fix the double suffix you get an error.
But it is easy to handle in a try block, with a loop to find a non-occupied
name like myphoto_2.jpg

I wrote a bunch of scripts to handle moving downloaded pdfs, which IE names
"sciencedirect n". My script moves these from the download folder to my
papers folder, finding new, unique names to avoid conflicts.

always Tim


It would be nice if preview was scriptable and I could say "get the
selection as text" from a pdf I am viewing.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Droplet to Rename Breaks Under Jaguar (From: John Delacour <email@hidden>)

  • Prev by Date: Found a use for 'reopen'
  • Next by Date: Re: Found a use for 'reopen'
  • Previous by thread: Re: Folder Action Vs Finder
  • Next by thread: Addressing an item by the first six characters of it's name
  • Index(es):
    • Date
    • Thread