Add files to iTunes in ascending order

This script adds files (audio files) to iTunes in the STOCK FOLDER in an ascending order (with Date Added with up arrow selected) so track 1 will be at the top and the greater numbers below it as per usual. One can have normal numbering or leading zero numbers from 1 to 9 (01, 02, etc.).

The script stops if there are no files in the STOCK FOLDER.

There is spoken text confirmation and iTunes is paused once all the files are processed.

I usually place this applescript in the Scripts main menu item at the top right.

Enjoy!

Keith

tell application “Finder”
set new_path to folder “DONE FOLDER” of folder “Desktop” of folder “” of folder “Users” of startup disk

set all_files to every file of folder "STOCK FOLDER" of folder "Desktop" of folder "<YOUR USER NAME>" of folder "Users" of startup disk
if all_files is {} then
	beep 2
	return
end if
repeat with i from 1 to the count of all_files
	set this_file to (item i of all_files) as string
	open file this_file
	delay 2
	set this_file2 to this_file
	move file this_file2 to new_path
end repeat
tell application "iTunes"
	pause
end tell
delay 1
tell application "Finder"
	activate
	say "The sound files have been added to itunes." using "Victoria"
end tell

end tell

Model: iMac (Retina 4K, 21.5-inch, 2017)
AppleScript: Version 2.10 (194)
Browser: Firefox 71.0
Operating System: macOS 10.14