Page 1 of 1

FM 8.5 export records. Name filename with variable

PostPosted: Mon Mar 05, 2007 6:41 am
by David Fox
Hi All,

I want to run a script that backs up the data from files as merge files. I want to export these files to a single folder but have the actual merge filename set from a variable.

My variable is $backupname which is
Get ( FileName ) & Get ( CurrentTimeStamp )

So far so good, but when i try and put this into a filepath for the next bit of the script which specifies the export destination,

file:Backupdatafolder/"$backupname"

I get the message that I cannot create the file on the disk. Can i use a variable this way?

PS I have also used seperate fields to construct the variable so it does not return "/" in the destination filename result. Still no luck!

Would appreciate some help as always!

David

Re: FM 8.5 export records. Name filename with variable

PostPosted: Mon Mar 05, 2007 5:39 pm
by John Sindelar
David Fox wrote:file:Backupdatafolder/"$backupname"


Hi.

I usually do something like:

"file:" & Get ( DesktopPath ) & "BaclupFolderName/" &
Let ([
filename = WHATEVERYOUWANTTONAMETHEFILE
];
Filter ( filename ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890" )
) // End Let

& ".extension"