Moving a file that I have just had applescript save out of entourage

Hey all,

Ok, so I have got my script to save the message out of entourage, but now I need to do other stuff to the file, but am stuck on how to reference to the newly save file.

Here is how it is at the moment.


property setEntourage : ""
global storageFolder
set storageFolder to ((path to desktop) as string) & " Test Folder:"

tell application "Microsoft Entourage"
	set themessage to the current messages
	save themessage in storageFolder
	log themessage
end tell

Any ideas anyone?

Thanks in advance,

Jason

Sounds like you want to move the file after you have saved it to a folder on the desktop? You will need something like the following. I didn’t have a chance to test it but it should get you most of the way there:


tell application "Finder"
activate
--Create the destination folder if it does not already exist
if exists folder "EndFolder" then
else
make new folder at desktop with properties {name:"EndFolder"}
end if

set OutFolder to folder "EndFolder"
move file (storageFolder & themessage) to OutFolder as alias
end tell

Model: Mac G5
Operating System: Mac OS X (10.3.9)