The SAVE OUTFILE line also references a macro that defines the folder path ahead of time, so I'm not sure if that complicates things.
Code: Select all
* Below is a list of common folders we use. * Comment out all the ones you don't want to use for this session. define !Path1() 'E:\MyDocs\Work\'!enddefine. * define !Path1() 'C:\Personal\'!enddefine. * etc. * Save file with today's date. string #savecmd(a150). do if $casenum EQ 1. - compute #savecmd = concat("SAVE OUTFILE='",!Path1,"This is my file name ",$date,".sav'."). - write outfile = "C:\temp\save.txt" / #savecmd. end if. exe. * run the macro. include file = "C:\temp\save.txt".