sorry, I posted this already in mac basics, but I think this may be a better spot for it.
I'm trying to write an apple script to attach to an image folder that will:
-add a number to the beginning of a file in sequence as I drop them into the folder.
example:
images are named:
image1.jpg
image2.jpg
-----------------
I want to drop them into the folder, and have it automatically add the prefix:
0001_image1.jpg
0002_image2.jpg
Now keep in mind I have no idea what I'm doing here. I've spent the last few hours trying to "reverse engineer" pre-made apple scripts, learning what I can about the commands and such. This is very confusing, but this is what I got so far:
-----------------
tell application "Finder"
set the_counter to 1
set new_name of added_items in file_list in folder this_folder to (the_counter & "- " & filename & ext)
end tell
---------------------------
Any help would be appreciated.
it now says "the variable "filename" is not defined."
edit: I updated the script as I have it so far. Still not working. Sometimes I wish I knew what I was doing.
I'm trying to write an apple script to attach to an image folder that will:
-add a number to the beginning of a file in sequence as I drop them into the folder.
example:
images are named:
image1.jpg
image2.jpg
-----------------
I want to drop them into the folder, and have it automatically add the prefix:
0001_image1.jpg
0002_image2.jpg
Now keep in mind I have no idea what I'm doing here. I've spent the last few hours trying to "reverse engineer" pre-made apple scripts, learning what I can about the commands and such. This is very confusing, but this is what I got so far:
-----------------
tell application "Finder"
set the_counter to 1
set new_name of added_items in file_list in folder this_folder to (the_counter & "- " & filename & ext)
end tell
---------------------------
Any help would be appreciated.
it now says "the variable "filename" is not defined."
edit: I updated the script as I have it so far. Still not working. Sometimes I wish I knew what I was doing.