set *file* parent to *newest_file*

Does anyone with a bit more applescript experience know how I might go about having the Finder get a file’s info, “Select New Parent” and choose the most recently created document? I’m trying to use this in conjunction with Automator to have a “To Do” list file change at midnight daily, so as to avoid having to do the manual change each day.

Thanks in advance for any help.

trassalg

“Select New Parent” is not an AppleScript term. Instead of telling us how you want to do something, tell us what you want to do. Sounds like you want to find the newest file in a folder at midnight. Then what?

I have an alias file on my Desktop (Users/trassalg/Desktop) called TODO. This alias points to the file Users/trassalg/Documents/ToDo_6_1_2007.doc.

I want this ToDo_6_1_2007.doc file to duplicate itself each night at midnight, change it’s name to ToDo_TodaysDate.doc and for the TODO alias on the desktop to select this new file as its parent file.

Hopefully this makes sense. Any clarification needed, let me know. So far I’ve made an Automator task that duplicated the file and renames it, but as far as the alias selecting it at its parent file I’m at a loss as it requires more knowledge of Applescript than I have.

On a side note, if anyone can recommend a beginner’s guide to Applescript and/or command reference library I’d greatly appreciate it.