Dynamic filenames

I’m wondering if it’s possible in Applescript to save or rename files using dynamic filenames. For example, getting the current date and time and then saving a file as 2005August081607 or whatever. It doesn’t necessarily have to be a date, I just want to make sure I get a completely unique filename.

What I’m trying to create is an Applescript app that uses the system_profiler to generate an XML document that I then use XML Tools to parse and either format the document like I want it or generate a new XML doc with the info taken from the original document. (I haven’t decided yet.) The thing is that the final XML document must have a completely unique filename, so I need to either save it with one or use a temporary name that I subsequently change. Does anyone know if and how this can be done? Thanks.

Model: Mac mini
AppleScript: 1.10
Browser: Safari 412.2
Operating System: Mac OS X (10.4)

set theTitle to do shell script " date '+%m%d%y%H%M%S'" as string

or you could go over board and do something like

set theTitle to do shell script " md5 -s `date '+%m%d%y%H%M%S'` | cut -f 4 -d ' '"

Perfect, thanks.

This might be a stupid question, but how do you tie the variable theTitle to the actual filename? Can you save a file using the variable or do you tell Finder to rename it afterwards?

I’m something of an Applescript newbie, you see…

Edit: Nevermind, I figured it out.