Another Novice Query - Dynamic Folder name Copying/Compressing

Hi

I am rather new to Applescript but not Macs, just happen to operate in different regions of it.
I have an OS X 10.4.11 machine running Filemaker Server 10. It does daily, hourly and weekly backups, and keeps “n” versions of each set before it starts to overwrite them. The folders get names like “Daily_2009-10-19_2300” are a re quite dynamic.
What I am backing up to it a Windows share - FMServer 5.5 used to do this effortlessly, but now Filemaker 10 will only write backups to the box it is on.

I have been able to devise an Automator routine that will ZIP a folder, copy it to the Windows share, then put the Zip in the trash on the Mac. I even call a little Applescript that empties the trash. Hardly rocket science, though it took a hour or so, and seemed like rocket science to me.

Anyway, so now I can move the file, the problem with the dynamic naming that server 10 is doing is that my desired folder to backup is a moving target. It does not exist until 11pm each night, but its name is quite predictable. If this were Filemaker I would define a variable for the file name as “Daily_” & year(get(currentdate)) & “-” etc.

eg.
tell application “Finder”

Set d = currentdate
set f = “/Library/Filemaker Server/Data/Backups/”
set n = “daily_” & year(d) & “-” & right(“0” & month(d);2) & “-” & right(“0” & day(d);2) & “_2300”
set g = n & f

compress folder f to desktop
end tell

Please excuse the execrable Applescript code, I was just thinking in Filemaker Speak.

I read that I can use variables in Applescript. All I think I want to do is to run an Applescript that will ZIP the 11 pm daily folder to the desktop where I can unleash my Automator wizardry on it.

I can schedule the Automator action via iCal. It is just the missing link, as described above, that I am missing.

Thanks in advance for any help,

Stephen

Model: 10.4.11 iMac
Browser: Safari 531.9
Operating System: Mac OS X (10.6)