Count and rename files
Count and rename files
- Subject: Count and rename files
- From: Peter Mathiessen <email@hidden>
- Date: Wed, 24 Sep 2003 10:48:43 +0200
Hi all,
Is it possible in some easy way to change the name of a file or rather a
bunch of files to this - 0001.eps, 0002.eps etc.
Problem:
Folder containing 100 files. the filenames are different and also the
suffix. Want a script to count the files and rename them to 30001.xxx2,
30002.xxx2 and up to 30100.xxx2.
The suffix can be different, 3eps2, 3tif2, 3.psd2 etc. The amount of files
can also be different.
I have tried different solutions but no one seems to do the job.
Thanks in advance!
Peter
copy "Macintosh HD:Script_folder:Count_rename_files:" as text to the_vol
set searchFolder to alias (the_vol & "Folder_in")
set destinationfolder to alias (the_vol & "temp")
set rename_file to alias (the_vol & "rename")
set destination_file_folder to alias (the_vol & "filer_ut")
set myList to list folder destinationfolder without invisibles
repeat with myFilename in every item of myList
set movefile to alias (the_vol & "temp:" & myFilename)
tell application "Finder"
set name of file movefile to characters -1 thru -4 of (myFilename)
as string
end tell
end repeat
_______________________________________________
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.