• 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
File name list order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File name list order


  • Subject: File name list order
  • From: Michael Conner <email@hidden>
  • Date: Fri, 10 Dec 2004 11:00:39 -0600

I'm working on a script to combine a series of tif files into a single PDF
file. One of the problems in doing this with Acrobat is that when you use
its Create PDF from Multiple files tool, the list files is not sorted, and
it can be tedious to put them in the right order. I have a series of files
named txt001.tif, txt002.tif etc. that must be combined in order.

After much cursing and swearing over Acrobat's insert pages function, I
actually have it working. However, one oddity came up. I've never scripted
something quite like this before and am only an occasional scripter, so I
wasn't expecting to be able to just work on the files in the order they
would be returned with the command

    set these_files to every file of folder this_folder

Or what I ended up using,

set TifFiles to the name of every file of folder folderpath whose name
extension is "tif"

If you copy all the files in a folder in Finder and paste into a text
editor, they are (usually) not in name order. To my surprise, the tif file
list was returned in name order.

Will this always be the case, or should I sort the list to be on the safe
side? I was going to use a snippet I found to use a do shell script sort.

Mike Conner


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: File name list order
      • From: Doug McNutt <email@hidden>
    • Re: File name list order
      • From: "Adam K. Wuellner" <email@hidden>
  • Prev by Date: Re: truncate the hostname of local computer
  • Next by Date: Re: truncate the hostname of local computer
  • Previous by thread: Re: Scripting Transmit using applescript in FileMaker
  • Next by thread: Re: File name list order
  • Index(es):
    • Date
    • Thread