FM 8.5 export records. Name filename with variable

General support questions.
Posts: 58
Joined: Tue Jul 26, 2005 12:08 pm
Location: London
PostPosted: Mon Mar 05, 2007 6:41 am
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
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Mar 05, 2007 5:39 pm
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"
John Sindelar
SeedCode

Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: