move file by filename via applescript?
I have a load of files that are desposited on my user desktop via ftp. Each of these files begins with the same six letters. It is a pain to select all of the files manually and then pull them into a folder. I have looked extensively and have tried unsuccessfully to create an applescript that will do the following:
Take the files with fileNames containing "XXXXX" (or beginning with "XXXXX") at "mac HD:user:me" and move them to the folder "XXXXX" at "mac HD:user:me."
These files all end with the same extension, so I could also delimit the files to be moved by using their extension, if that is a better solution.
Lastly, it would be great if I could also set the above action to occur automatically at some interval.
I can't imagine that the above sort of action is difficult via applescript, but I must admit that a solution eludes me. If someone happens to have a script that accomplishes this sort of action that thery might share, please let me know.
Thanks
Mac mini, OS X Mountain Lion (10.8.3)