I'm trying to save a file to a location on a network drive. This location has a space in the name of a certain folder. I got the file to save successfully bby putting the whole path in double quotes but now they want the date on the end of the file and it's causing issues with it saving. I've pasted what I have below but it doesn't work. I even tried putting double quotes around the whole thing and still no luck. Any ideas?
-SET &DTSTAMP = EDIT(&MDYY,'99999999') ; -SET &OUTFILE = 'D:\IBI\EXPORTS\LISA\mark tripp' || &DTSTAMP || '.txt'; FILEDEF RESULTS DISK &OUTFILEThis message has been edited. Last edited by: Kerry,
Thanks for your response but that didn't work either. It returned the error of "ERROR WRITING OUTPUT FILE: RESULTS" I can get it to work just fine on a location where there's no space in the path but the owners dont want to remove the space in their folder.
Webfocus 8.1.0.5 Windows 2008 Excel,PDF,HTML
March 10, 2011, 04:18 PM
jfr99
Hi MikeW,
I had to put double quotes around the OUTFILE variable to get the filedef to work.
FILEDEF RESULTS DISK "&OUTFILE"
Let me know if that helps.
Jim
WebFocus 8.201M, Windows, App Studio
March 10, 2011, 04:41 PM
MikeW
I still got the same error, I tried the quotes around the amper variable like you suggested.
Webfocus 8.1.0.5 Windows 2008 Excel,PDF,HTML
March 10, 2011, 04:51 PM
jfr99
Is the space just in the file name(as in your example) or is there also a space in the folder name?
WebFocus 8.201M, Windows, App Studio
March 10, 2011, 04:52 PM
Tom Flynn
Try it with .EVAL. Also, make sure you have write access to the disk, and, the path is correct. And, you don't need the EDIT.
This worked for me:
APP PREPENDPATH IBISAMP
-RUN
-SET &ECHO=ALL;
SET SHOWBLANKS = ON
-RUN
-SET &OUTFILE = 'D:\ibi\64bit\apps\bi_adv\tflynn' || '&MDYY.EVAL' || '.txt';
FILEDEF RESULTS DISK &OUTFILE
? FILEDEF
-RUN
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
COUNTRY
CAR
MODEL
ON TABLE SAVE AS RESULTS
END
-EXIT