[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Trying to run a copy / rename command from Windows NT Scheduled T ask
- Subject: Trying to run a copy / rename command from Windows NT Scheduled T ask
- From: "Gentry, Andrew (SAIC)" <genta2@BP.COM>
- Date: Wed, 2 Oct 2002 11:34:57 +0100
Hi,
I am trying to run a simple piece of SQR which basically takes a file copies
it to a different directory and renames it with a current date extension.
I have written the code and I can run it successfully either directly in
Brio Report Builder or if I compile it and run it from an icon which runs a
cmd file which uses SQRWT.
The problem I have is when I try to run the same cmd file which I use via
the icon from the windows 2000 scheduler. It runs the code, but every time I
try to use call system to go off and run 'copy' or 'rename' it never seems
to do it and then carries on with the rest of the code. I realise it is
probably starting up another window / session and then loses control.
I have tried different combinations like
let $command_string = 'C:\WINNT\system32\CMD /c ' || 'xcopy ' || $NEW_AP_FN
|| ' ' || $FP || '\history' || ' > ' || $acopyaplog
call system using $command_string #status wait
let $command_string = 'C:\WINNT\system32\CMD /c ' || 'ren ' || $FP ||
'\history\apfile' || ' ' || $fname3 || ' >> ' || $acopyaplog
call system using $command_string6 #status wait
where I have defined the variable names earlier in the program and have also
tried adding start /wait commands after the cmd /c part, but none of these
seem to work when using the scheduler.
Can anyone help ?
Many thanks,
Andy.