Batch File Renaming

i know this may sound like a common problm but i just can not figure it out… i have a folder on my desktop that i need to duplicate and then totally rename all the files is it… i dont want to add a string to the start or the end… i want to do this on a regualar basis as the folder contains text files i download regulary.

for example the original files as:
/Desktop/downloads/filename_1.txt
/Desktop/downloads/filename_2.txt
/Desktop/downloads/filename_3.txt
/Desktop/downloads/filename_4.txt

and it needs to be:
/Desktop/downloads_copy/001.txt
/Desktop/downloads_copy/002.txt
/Desktop/downloads_copy/003.txt
/Desktop/downloads_copy/004.txt

what do you have so far ?

ummm… no freaking idea!!!

Hi Sin

There’s plenty of people on here who can do this better i’m sure but this could be something similar to what you want.

tell application "Finder"
	set folder_one to choose folder ---> alias returned / downloads folder
	set folder_two to choose folder ---> alias returned / downloads_copy folder
	duplicate every file of folder_one to folder_two
	set files_of_folder to every item of folder_two as alias list
	repeat with i from 1 to number of items in files_of_folder
		set name of (item i of files_of_folder) to ("00" & i & ".rtf") as string
	end repeat
end tell