Count files
Count files
- Subject: Count files
- From: Peter Mathiessen <email@hidden>
- Date: Tue, 13 Aug 2002 08:39:20 +0200
Hi all,
I am in need of a script that renames the files in a folder.
Today I am using a random number, but a neat solution would be to use a
counter of some sort.
If the folder contains 3 files, the filename would be:
001.doc
002.doc
003.doc
Anyone?
get random number from 1000 to 3000
set x to result
set search_for_file to alias (the_vol & "Documents:")
set myListforfile to list folder search_for_file without invisibles
repeat with myFilename in myListforfile
set myfile to alias (the_vol & "Documents:" & myFilename)
end repeat
tell application "Finder"
set name of myfile to (x as string) & ".doc"
end tell
_______________________________________________
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.