I hope I am posting in the right place here (if not I apologize). I have lots of files (quarkXpress along with fonts and links) copied from an archive from 10 years ago (from a PC perhaps) that some (all the QuarkXpress files along with some images JPGs or EPSs) have been stripped of their extensions.
I was looking for a script that based on files metadata will add as batch the missing extensions properly (.qxd to Quark files; JPG to the right JPG images as well as EPS to EPS files etc) when I found one that was suppose to do exactly this but for some reasons it doesn’t. I have to mention that my apple script knowledge is absolutely zero but I was hopefully if we can solve this issue many people will benefit from this fix. QuarkXpress is known to loose extension when copied between platforms.
Here is the script:
(*
EPSF (eps), AI (ai), PDF (pdf), ART5 is Illustrator
indd = Creator: InDn, Type: IDd5
indd = Creator: InDn, Type: IDd4
ai = Creator: ART5, Type: PDF
eps = Creator: ART5, Type: EPSF
psd = Creator: 8BIM, Type: 8BPS
pdf = Creator: CARO, Type: PDF
jpg = Creator: 8BIM, Type: JPEG
eps = Creator: 8BIM, Type: EPSF
qxd = Creator: XPR3, Type: XPRJ
tif = Creator: 8BIM, Type: TIFF
*)
-- THESE PROPERTIES ARE FOR THE NOTIFICATION ROUTINE
-- if true, the script will speak the alert. If false, the script will
--display an alert
property speak_alert : false
-- set the amount of time before dialogs auto-answer.dialog
property dialog_timeout : 30
-- THIS PROPERTY IS USED TO INDICATE WHETHER THE SCRIPT
--CHECKS THE INCOMING FILES FOR COMPLETED TRANSFER
-- SET THIS PROPERTY TO TRUE FOR FOLDERS SHARED VIA
--FILE SHARING
-- NOTE THAT ITEMS DROPPED IN SHARED FOLDERS WILL
--HAVE THEIR LABEL SET TO 7
property copy_checks_indicator : false
-- THESE PROPERTIES ARE FOR THE STATUS CHECKING
--ROUTINES
property item_check_delay_time : 2
property folder_check_delay_time : 3
property special_label_index : 7
on adding folder items to this_folder after receiving added_items
try
if copy_checks_indicator is true then
-- CHECK THE FILES TO MAKE SURE THEY'RE
--COMPLETELY AVAILABLE
set the added_items to my check_added_items(the added_items)
if the added_items is {} then return "no valid items"
end if
tell application "Finder"
--get the name of the folder
set this_folder_name to the name of this_folder
end tell
-- find out how many new items have been placed in the folder
set new_item_count to the number of items in the added_items
tell application "Finder"
repeat with x in added_items
copy name of x as string to FileName
copy file type of x as string to FileType
copy creator type of x as string to FileCreator
-- check for Quark
if FileType is "XPRJ" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then
set Suffix to ".qxd"
set the name of x to FileName & Suffix
end if
else if FileType is "XDOC" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then
set Suffix to ".qxd"
set the name of x to FileName & Suffix
end if
-- check for Illustrator ai
else if FileType is "PDF" and FileCreator is "ART5" then
if FileName does not end with ".ai" then
set Suffix to ".ai"
set the name of x to FileName & Suffix
end if
-- check for InDesign
else if FileType is "InDn" and FileCreator is "IDd5" then
if FileName does not end with ".indd" then
set Suffix to ".indd"
set the name of x to FileName & Suffix
end if
--check for InDesign CS2
else if FileType is "InDn" and FileCreator is "IDd4" then
if FileName does not end with ".indd" then
set Suffix to ".indd"
set the name of x to FileName & Suffix
end if
-- check for Illustrator eps
else if FileType is "EPSF" and FileCreator is "ART5" then
if FileName does not end with ".eps" then
set Suffix to ".eps"
set the name of x to FileName & Suffix
end if
-- check for Photoshop psd
else if FileType is "8BPS" and FileCreator is "8BIM" then
if FileName does not end with ".psd" then
set Suffix to ".psd"
set the name of x to FileName & Suffix
end if
-- check for Photoshop tif
else if FileType is "TIFF" and FileCreator is "8BIM" then
if FileName does not end with ".tif" then
set Suffix to ".tif"
set the name of x to FileName & Suffix
end if
-- check for Photoshop jpg
else if FileType is "JPEG" and FileCreator is "8BIM" then
if FileName does not end with ".jpg" then
set Suffix to ".jpg"
set the name of x to FileName & Suffix
end if
-- check for pdf
else if FileType is "PDF" and FileCreator is "CARO" then
if FileName does not end with ".pdf" then
set Suffix to ".pdf"
set the name of x to FileName & Suffix
end if
end if
end repeat
end tell
end try
end adding folder items to
on remove_labels(the added_items)
tell application "Finder"
repeat with this_item in the added_items
set the label index of this_item to 0
end repeat
end tell
end remove_labels
on check_added_items(the added_items)
-- check the transfer status of every added file to determine
-- if each file has completed being moved into the
--attached folder
set the notbusy_items to {}
repeat with i from 1 to the number of items in the added_items
set this_item to (item i of the added_items)
if my check_busy_status(this_item) is false then
set the end of the notbusy_items to this_item
end if
end repeat
return the notbusy_items
end check_added_items
on check_busy_status(this_item)
-- a folder can contain items partially transfered
-- this routine will wait for all the folder contents to transfer
if the last character of (this_item as text) is ":" then
set the check_flag to false
repeat
-- look for any files within the folder that are still transferring
tell application "Finder"
try
set the busy_items to the name of every file of the entire contents of this_item whose file type begins with "bzy"
on error
set the busy_items to {}
end try
end tell
if the check_flag is true and the busy_items is {} then return false
-- pause for the indicated time
delay the folder_check_delay_time
-- set the flag and check again
set the check_flag to true
end repeat
else
-- the passed item is a single file, suitcase, clipping, etc.
-- check the label of the item. If it is the marked label
--then it's already been processed so ignore.
tell application "Finder"
if (the label index of this_item) as integer is the special_label_index then
return "ignore"
end if
end tell
set the check_flag to false
repeat
tell application "Finder"
set the item_file_type to the file type of this_item
end tell
if the check_flag is true and the item_file_type does not start with "bzy" then
tell application "Finder"
set the label index of this_item to the special_label_index
end tell
-- allow the Finder time to change the label
delay the item_check_delay_time
return false
else if the item_file_type does not start with "bzy" then
-- set the flag and check again
set the check_flag to true
end if
-- pause for the indicated time
delay the item_check_delay_time
end repeat
end if
end check_busy_status
--HANDLER FOR KEEPING THIS FOLDER OPEN
--To activate the handler, remove the comment
--markers (the parens and asterisks)
--at the beginning and end of the following handler
--and save this script.
(*
on closing folder window for this_folder
beep
tell application "Finder"
open this_folder
end tell
end closing folder window for
*)
actually this is the wrong place. This kind of question belongs to AppleScript | OS X
Folder Action scripts must be located b/Library/Scripts/Folder Action Scripts[/b] and attached to a hot folder.
Before installing the folder action you can test a folder action script by removing or commenting out the lines
on adding folder items to this_folder after receiving added_items
try
and
end try
end adding folder items to
and adding these two lines after the last property line
set this_folder to choose folder
tell application "Finder" to set added_items to items of this_folder as alias list
then you can select a folder containing appropriate files and you will get errors if something goes wrong
I apologize placing this post in the wrong place. Thank you for your help. I did remove the lines of code you indicated and place the suggested one and what do you know… I got some errors and nothing has been done
Looks like I can’t upload an image this server therefore I will just write here whatever the errors say:
“AppleScript Error: Can’t make file type of item 1 of {alias …(file path)/file.job”} into type string."
There is a file with .job extension not sure what stands for. Perhaps the script stops because it doesn’t recognize this extension. Can it skip whatever extension is not included in the script?
Now the script looks like this:
(*
EPSF (eps), AI (ai), PDF (pdf), ART5 is Illustrator
indd = Creator: InDn, Type: IDd5
indd = Creator: InDn, Type: IDd4
ai = Creator: ART5, Type: PDF
eps = Creator: ART5, Type: EPSF
psd = Creator: 8BIM, Type: 8BPS
pdf = Creator: CARO, Type: PDF
jpg = Creator: 8BIM, Type: JPEG
eps = Creator: 8BIM, Type: EPSF
qxd = Creator: XPR3, Type: XPRJ
tif = Creator: 8BIM, Type: TIFF
*)
-- THESE PROPERTIES ARE FOR THE NOTIFICATION ROUTINE
-- if true, the script will speak the alert. If false, the script will
--display an alert
property speak_alert : false
-- set the amount of time before dialogs auto-answer.dialog
property dialog_timeout : 30
-- THIS PROPERTY IS USED TO INDICATE WHETHER THE SCRIPT
--CHECKS THE INCOMING FILES FOR COMPLETED TRANSFER
-- SET THIS PROPERTY TO TRUE FOR FOLDERS SHARED VIA
--FILE SHARING
-- NOTE THAT ITEMS DROPPED IN SHARED FOLDERS WILL
--HAVE THEIR LABEL SET TO 7
property copy_checks_indicator : false
-- THESE PROPERTIES ARE FOR THE STATUS CHECKING
--ROUTINES
property item_check_delay_time : 2
property folder_check_delay_time : 3
property special_label_index : 7
set this_folder to choose folder
tell application "Finder" to set added_items to items of this_folder as alias list
if copy_checks_indicator is true then
-- CHECK THE FILES TO MAKE SURE THEY'RE
--COMPLETELY AVAILABLE
set the added_items to my check_added_items(the added_items)
if the added_items is {} then return "no valid items"
end if
tell application "Finder"
--get the name of the folder
set this_folder_name to the name of this_folder
end tell
-- find out how many new items have been placed in the folder
set new_item_count to the number of items in the added_items
tell application "Finder"
repeat with x in added_items
copy name of x as string to FileName
copy file type of x as string to FileType
copy creator type of x as string to FileCreator
-- check for Quark
if FileType is "XPRJ" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then
set Suffix to ".qxd"
set the name of x to FileName & Suffix
end if
else if FileType is "XDOC" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then
set Suffix to ".qxd"
set the name of x to FileName & Suffix
end if
-- check for Illustrator ai
else if FileType is "PDF" and FileCreator is "ART5" then
if FileName does not end with ".ai" then
set Suffix to ".ai"
set the name of x to FileName & Suffix
end if
-- check for InDesign
else if FileType is "InDn" and FileCreator is "IDd5" then
if FileName does not end with ".indd" then
set Suffix to ".indd"
set the name of x to FileName & Suffix
end if
--check for InDesign CS2
else if FileType is "InDn" and FileCreator is "IDd4" then
if FileName does not end with ".indd" then
set Suffix to ".indd"
set the name of x to FileName & Suffix
end if
-- check for Illustrator eps
else if FileType is "EPSF" and FileCreator is "ART5" then
if FileName does not end with ".eps" then
set Suffix to ".eps"
set the name of x to FileName & Suffix
end if
-- check for Photoshop psd
else if FileType is "8BPS" and FileCreator is "8BIM" then
if FileName does not end with ".psd" then
set Suffix to ".psd"
set the name of x to FileName & Suffix
end if
-- check for Photoshop tif
else if FileType is "TIFF" and FileCreator is "8BIM" then
if FileName does not end with ".tif" then
set Suffix to ".tif"
set the name of x to FileName & Suffix
end if
-- check for Photoshop jpg
else if FileType is "JPEG" and FileCreator is "8BIM" then
if FileName does not end with ".jpg" then
set Suffix to ".jpg"
set the name of x to FileName & Suffix
end if
-- check for pdf
else if FileType is "PDF" and FileCreator is "CARO" then
if FileName does not end with ".pdf" then
set Suffix to ".pdf"
set the name of x to FileName & Suffix
end if
end if
end repeat
end tell
on remove_labels(the added_items)
tell application "Finder"
repeat with this_item in the added_items
set the label index of this_item to 0
end repeat
end tell
end remove_labels
on check_added_items(the added_items)
-- check the transfer status of every added file to determine
-- if each file has completed being moved into the
--attached folder
set the notbusy_items to {}
repeat with i from 1 to the number of items in the added_items
set this_item to (item i of the added_items)
if my check_busy_status(this_item) is false then
set the end of the notbusy_items to this_item
end if
end repeat
return the notbusy_items
end check_added_items
on check_busy_status(this_item)
-- a folder can contain items partially transfered
-- this routine will wait for all the folder contents to transfer
if the last character of (this_item as text) is ":" then
set the check_flag to false
repeat
-- look for any files within the folder that are still transferring
tell application "Finder"
try
set the busy_items to the name of every file of the entire contents of this_item whose file type begins with "bzy"
on error
set the busy_items to {}
end try
end tell
if the check_flag is true and the busy_items is {} then return false
-- pause for the indicated time
delay the folder_check_delay_time
-- set the flag and check again
set the check_flag to true
end repeat
else
-- the passed item is a single file, suitcase, clipping, etc.
-- check the label of the item. If it is the marked label
--then it's already been processed so ignore.
tell application "Finder"
if (the label index of this_item) as integer is the special_label_index then
return "ignore"
end if
end tell
set the check_flag to false
repeat
tell application "Finder"
set the item_file_type to the file type of this_item
end tell
if the check_flag is true and the item_file_type does not start with "bzy" then
tell application "Finder"
set the label index of this_item to the special_label_index
end tell
-- allow the Finder time to change the label
delay the item_check_delay_time
return false
else if the item_file_type does not start with "bzy" then
-- set the flag and check again
set the check_flag to true
end if
-- pause for the indicated time
delay the item_check_delay_time
end repeat
end if
end check_busy_status
--HANDLER FOR KEEPING THIS FOLDER OPEN
--To activate the handler, remove the comment
--markers (the parens and asterisks)
--at the beginning and end of the following handler
--and save this script.
(*
on closing folder window for this_folder
beep
tell application "Finder"
open this_folder
end tell
end closing folder window for
*)
Thank you very much for you help Stefan,
Really appreciate it
.
tell application "Finder"
repeat with x in added_items
copy name of x as string to FileName
copy file type of x as string to FileType
copy creator type of x as string to FileCreator
.
with
.
tell application "Finder"
repeat with x in added_items
set theFile to file (x as text)
tell theFile to set {FileName, FileType, FileCreator} to {its name, file type as text, creator type as text}
It seems that the Finder can’t retrieve file type and creator from an alias specifier
No error executing the script now but no result either
Here is what I found under replies tab in AppleScript editor:
tell application "TextEdit"
choose folder
--> alias "Macintosh HD:Users:mariusburlan:Desktop:teste:input:"
end tell
tell application "Finder"
get every file of alias "Macintosh HD:Users:mariusburlan:Desktop:teste:input:"
--> {}
get name of alias "Macintosh HD:Users:mariusburlan:Desktop:teste:input:"
--> "input"
end tell
Oh I see what the problem is…my bad. This script is going to work (as you actually said already) with a “hot folder” only where you are suppose to place all the files that you want the script to chance.
The “input” folder is not empty. Includes more other folders that include folders and so forth. In these folders some files (fonts, images and quarkXpress files are missing the extension). I thought in the first place that this script is able to look to a certain location and (a drive for instance including folders within folders) and add whatever extension is needed based on the file metadata.
the script considers only files in the folder “input”, not in any subfolders.
So does the folder action. It will be triggered only by adding files to the hot folder, not to any subfolder.
Put some of the qxd etc. files into the folder “input” and run the script again
You are right Stefan. If when prompted you target one folder (no subfolders) the files will get the proper extensions. The issue here is that I have magazine issues from 2008 that I need to fix. The issues structures includes lot of subfolders and I thought I could be target all of these at once.
I apologize for not making myself clear. I imagine that this is a completely different story is it not?
Then a folder action is not the right solution.
Basically you can use the script but it needs to be extended to walk through the entire folder hierarchy
set baseFolder to choose folder
processFolder(baseFolder)
on processFolder(theFolder)
tell application "Finder"
set theItems to items of theFolder
repeat with anItem in theItems
if class of anItem is folder then
my processFolder(anItem)
else
my processFile(anItem)
end if
end repeat
end tell
end processFolder
on processFile(theFile)
tell application "Finder"
tell theFile to set {FileName, NameExtension, FileType, FileCreator} to {its name, name extension, file type as text, creator type as text}
if NameExtension is not missing value then return -- do nothing if the file has an extension
end tell
set Suffix to missing value
-- check for Quark
if FileType is "XPRJ" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then set Suffix to ".qxd"
else if FileType is "XDOC" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then set Suffix to ".qxd"
-- check for Illustrator ai
else if FileType is "PDF" and FileCreator is "ART5" then
if FileName does not end with ".ai" then set Suffix to ".ai"
-- check for InDesign
else if FileType is "InDn" and FileCreator is "IDd5" then
if FileName does not end with ".indd" then set Suffix to ".indd"
--check for InDesign CS2
else if FileType is "InDn" and FileCreator is "IDd4" then
if FileName does not end with ".indd" then set Suffix to ".indd"
-- check for Illustrator eps
else if FileType is "EPSF" and FileCreator is "ART5" then
if FileName does not end with ".eps" then set Suffix to ".eps"
-- check for Photoshop psd
else if FileType is "8BPS" and FileCreator is "8BIM" then
if FileName does not end with ".psd" then set Suffix to ".psd"
-- check for Photoshop tif
else if FileType is "TIFF" and FileCreator is "8BIM" then
if FileName does not end with ".tif" then set Suffix to ".tif"
-- check for Photoshop jpg
else if FileType is "JPEG" and FileCreator is "8BIM" then
if FileName does not end with ".jpg" then set Suffix to ".jpg"
-- check for pdf
else if FileType is "PDF" and FileCreator is "CARO" then
if FileName does not end with ".pdf" then set Suffix to ".pdf"
end if
if Suffix is not missing value then tell application "Finder" to set the name of theFile to FileName & Suffix
end processFile
No errors when running but no results either.
Stefan, I really appreciate your help, a lot.
Bellow is the reply from Apple script editor:
tell application "AppleScript Editor"
choose folder
--> alias "Macintosh HD:Users:mariusburlan:Desktop:teste:input:"
end tell
tell application "Finder"
get every item of alias "Macintosh HD:Users:mariusburlan:Desktop:teste:input:"
--> {folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk}
get class of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> folder
get every item of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> {document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk}
get class of document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "XDOC"
get creator type of document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "XPR3"
get name of document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> " 6-9/Contributors"
get name extension of document file " 6-9/Contributors" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TEXT"
get creator type of document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ttxt"
get name of document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> " 6-9/Contributors.rep"
get name extension of document file " 6-9/Contributors.rep" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> folder
get every item of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> {document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk}
get class of document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "FFIL"
get creator type of document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "DMOV"
get name of document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "55 Helvetica Roman"
get name extension of document file "55 Helvetica Roman" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "FFIL"
get creator type of document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "DMOV"
get name of document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ATOur Bodoni Light"
get name extension of document file "ATOur Bodoni Light" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "LWFN"
get creator type of document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ATPS"
get name of document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ATOurBodLig"
get name extension of document file "ATOurBodLig" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "LWFN"
get creator type of document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ATPS"
get name of document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ATOurBodLigIta"
get name extension of document file "ATOurBodLigIta" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "LWFN"
get creator type of document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ASPF"
get name of document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "HelveNeuRom"
get name extension of document file "HelveNeuRom" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "LWFN"
get creator type of document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Zn&x"
get name of document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TradeGot"
get name extension of document file "TradeGot" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "FFIL"
get creator type of document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "DMOV"
get name of document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TradeGothic"
get name extension of document file "TradeGothic" of folder "fonts Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> folder
get every item of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> {document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk, document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk}
get class of document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TIFF"
get creator type of document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "CAR"
get name extension of document file "CAR" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Lyndon Grove.eps"
get name extension of document file "Lyndon Grove.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
get class of document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TIFF"
get creator type of document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Montecristo Type"
get name extension of document file "Montecristo Type" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TIFF"
get creator type of document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "NU/1-1/CB-6"
get name extension of document file "NU/1-1/CB-6" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "NV.1-1.CB.1.eps"
get name extension of document file "NV.1-1.CB.1.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
get class of document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "NV.1-1.CB.2.eps"
get name extension of document file "NV.1-1.CB.2.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
get class of document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "NV.1-1.CB.3.eps"
get name extension of document file "NV.1-1.CB.3.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
get class of document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "NV.1-1.CB.4.eps"
get name extension of document file "NV.1-1.CB.4.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
get class of document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Necklace_1_v2"
get name extension of document file "Necklace_1_v2" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "TIFF"
get creator type of document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "8BIM"
get name of document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Peskett"
get name extension of document file "Peskett" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> ""
get class of document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> document file
get file type of document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "EPSF"
get creator type of document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "ART5"
get name of document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "Type/logo.eps"
get name extension of document file "Type/logo.eps" of folder "images Æ’" of folder " 6-9/Contributors.job" of folder "input" of folder "teste" of folder "Desktop" of folder "mariusburlan" of folder "Users" of startup disk
--> "eps"
end tell
you are a magician. I can’t say how much I thank you for doing this. It works like a charm. It was very nice of you to help me out with this.
For anybody else that needs the complete working script here it is:
set baseFolder to choose folder
processFolder(baseFolder)
on processFolder(theFolder)
tell application "Finder"
set theItems to items of theFolder
repeat with anItem in theItems
if class of anItem is folder then
my processFolder(anItem)
else
my processFile(anItem)
end if
end repeat
end tell
end processFolder
on processFile(theFile)
tell application "Finder"
tell theFile to set {FileName, NameExtension, FileType, FileCreator} to {its name, name extension, file type as text, creator type as text}
-- if NameExtension is not missing value then return -- do nothing if the file has an extension
end tell
set Suffix to missing value
-- check for Quark
if FileType is "XPRJ" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then set Suffix to ".qxd"
else if FileType is "XDOC" and FileCreator is "XPR3" then
if FileName does not end with ".qxd" then set Suffix to ".qxd"
-- check for Illustrator ai
else if FileType is "PDF" and FileCreator is "ART5" then
if FileName does not end with ".ai" then set Suffix to ".ai"
-- check for InDesign
else if FileType is "InDn" and FileCreator is "IDd5" then
if FileName does not end with ".indd" then set Suffix to ".indd"
--check for InDesign CS2
else if FileType is "InDn" and FileCreator is "IDd4" then
if FileName does not end with ".indd" then set Suffix to ".indd"
-- check for Illustrator eps
else if FileType is "EPSF" and FileCreator is "ART5" then
if FileName does not end with ".eps" then set Suffix to ".eps"
-- check for Photoshop psd
else if FileType is "8BPS" and FileCreator is "8BIM" then
if FileName does not end with ".psd" then set Suffix to ".psd"
-- check for Photoshop tif
else if FileType is "TIFF" and FileCreator is "8BIM" then
if FileName does not end with ".tif" then set Suffix to ".tif"
-- check for Photoshop jpg
else if FileType is "JPEG" and FileCreator is "8BIM" then
if FileName does not end with ".jpg" then set Suffix to ".jpg"
-- check for pdf
else if FileType is "PDF" and FileCreator is "CARO" then
if FileName does not end with ".pdf" then set Suffix to ".pdf"
end if
if Suffix is not missing value then tell application "Finder" to set the name of theFile to FileName & Suffix
end processFile