File name list order
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