[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Call OS to copy output file



Greetings -
 
I'm having trouble copying an output file (not a .lis file) that gets created using WRITE command.  I build the DOS command as follows and am closing the file before attempting to copy:
 
     let $filedate = edit(datenow(), 'YYYYMMDD')
     close 1
     let $new_file1 = {PATH} || $filedate || '_' || {FILE1} || {EXTENSION}
     let $copy_command = 'copy ' || $file1 || ' ' || $new_file1
      call system using $copy_command #status
This errors with a return code of 2.  Any idea what's going on?  Does SQR "hold" onto a file until the program terminates?  Is there a way to do this within the SQR program?
 
Thanks for any tips,
Yuri


Get your FREE download of MSN Explorer at http://explorer.msn.com