 |
 |
how do i add jpg extension to 100's of files in a folder?
|
 |
|
 |
|
lopster
|
|
Can anyone tell me how i would go about adding .jpg to a ton of files without having to go in and add it to each individual one. I am also trying to avoid doing a batch in photoshop because i don't want to further compress my images. Any help is appreciated.
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Nov 1999
Status:
Offline
|
|
Hehe, I saw this at a MWNY conference, but sadly I forget the specifics. It was almost exactly the same thing that you want to do. If I remember correctly I think they used a program called "graphics converter", they were also changing the creator type, so it may be different for just adding the .jpg at the end.
Sorry if this was of absolutely no help, but I thought mentioning "graphics converter" might be useful...
EDIT:
The first file listed at this Apple webpage might be what you are looking for: http://www.apple.com/applescript/scr...cripts.00.html
[This message has been edited by ussfolsom (edited 10-12-2000).]
[This message has been edited by ussfolsom (edited 10-12-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status:
Offline
|
|
The followin script will walk through every file in a folder, appending '.jpg' to the file name.
If offers basic error handling against problems such as file name lengths, but could/should probably be enhanced with additional checks.
The 'on run' and 'on open' handlers are there to allow the script to be launched by either running the script (in which case it prompts for the folder to process) or by dropping a folder onto the script icon (in which case it processes that folder). These handlers don't have any significance on the script process itself and all the work is done in the 'ProcessAFolder' handler.
Code:
on ProcessAFolder(aFolder)
tell application "Finder"
-- get a list of the files in the folder
set theFiles to contents of folder aFolder
-- loop through each one
repeat with aFile in theFiles
-- check its file type - only change documents, not folders or aliases
if class of aFile is document file then
-- 'try' gives basic error handling, e.g. file name length errors
try
-- rename the file
set name of aFile to (((name of aFile) as string) & ".jpg")
end try
end if
end repeat
end tell
end ProcessAFolder
on open of folderList
-- Drag and drop handler. Process each folder dropped on the script.
repeat with aFolder in folderList
ProcessAFolder(contents of aFolder)
end repeat
end open
on run
-- Run handler. Prompt the user for a folder to process.
set theFolder to choose folder
ProcessAFolder(theFolder)
end run
|
|
Gods don't kill people - people with Gods kill people.
|
| |
|
|
|
 |
|
 |
|
lopster
|
|
THANKS!!!!! You guys are the best. I am flyin' high now.
|
|
|
| |
|
|
|
 |
|
 |
|
zekeoid
|
|
Debabelizer has a batch utility, and Photoshop can create actions that will repeat at the touch of the button
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |