Hello again.

I am trying to set up a kix script to run daily with the NT AT scheduler. I have a fully working kix script, and a ftp.cmd file that runs the script. If I double click the cmd file the script runs, and the files get transferred. However when I put the cmd file to be run by the AT service, it says it can't find the files. I know that the AT scheduler works OK as I can set it to open an instance of notepad. The beginning of my script calls a dir command to get the list of files. I have created a script file that runs the dir command, and puts a note on the screen as to whether it has found files or not. Again if I run this command by double clicking the icon it works OK, but if I set it up on the scheduler it says it can't find any files.

At scheduler is set with
AT 9:45 d:\scripts\neil.cmd

Relevant code is below.
neil.cmd file to run kix script

d:
cd \
cd ftp2btc
kix32 neil.kix
pause

script to list files

Break on
cls
$cr=chr(13)+chr(10) ;Code to enter for carriage return (DO NOT ALTER)


$temp=c:\temp ;Temp folder
$list=c:\temp\files.nsf ;List of files to be transferred
$source=\\source\BVPDATA\MF_DATA


? " -Creating list of Files to be transferred"

shell "%comspec% /c dir /o:d /b " + $source + "\BO*.RDY > " + $list


;to change type of file change BO*.RDY on above line


shell "%comspec% /c type " + $list + " | find /c " +chr(34) + "rdy" +chr(34) +" >nul"

if @error=0

? " -Files found"
exit
else
cls
? " -There are no files to be transferred in "+$source
exit
endif