I have PCAW 9.2 connecting to a 10.5 host. Once connected a batch file to rename text files on a Novell network drive (*.adt to *.txt) needs to run, then transfer *.txt back to the remote, then run another batch file to delete *txt on the host, and copy a "flag" file and retrieve the flag file. Host and remote pc's are running Windows 2000 pro.
Batch file is simply:
o:
ren *.adt *.txt
q:
copy connect.flg done.flg /y
If I connect without the script, I can run the batch files successfully either by double click, or Start->Run->cmd /c c:\batch\renfile1.bat.
If I have a script connect to the same host using the same host session and run the batch file using this script snippet:
;***********************************************************
; RUN BATCH FILE - Rename ADT files on host for retrieval.
;***********************************************************
@REN_FILE: ;Subroutine used to run a file on host.
Del "C:\FLAG\DONE.FLG" ; Delete flag file on remote.
If $DCD != 1 GoTo @REN_FILE_LOST ; If lost connection, call next host.
SessOpr Host Run "CMD /C DEL Q:\DONE.FLG" ; Delete on host.
GoSub @LOOP ; Pause script for five seconds.
If $DCD != 1 GoTo @REN_FILE_LOST ; If lost connection, call next host.
SessOpr Host Run "CMD /C C:\ADT\RENFILE1.BAT" ; Run file
GoSub @LOOP ; Wait 5 seconds
GoSub @LOOP ; Wait another 5 seconds.
Return
the batch file runs, but I get errors such as "specified user not found: O:" or "path not found".
Drive mappings to O: and Q: are already configured when the host computer logs into the network. I even tried a "net use" to map a new drive to no avail.
If I change all network references to local c:\ references, it works fine. I even tried replacing the line that executes the batch file to SessOpr Host Run "cmd /c ren o:\*.adt *.txt" but it didn't work. Same errors.
Any ideas how to get the batch file to access the network through the script?
Al
Batch file is simply:
o:
ren *.adt *.txt
q:
copy connect.flg done.flg /y
If I connect without the script, I can run the batch files successfully either by double click, or Start->Run->cmd /c c:\batch\renfile1.bat.
If I have a script connect to the same host using the same host session and run the batch file using this script snippet:
;***********************************************************
; RUN BATCH FILE - Rename ADT files on host for retrieval.
;***********************************************************
@REN_FILE: ;Subroutine used to run a file on host.
Del "C:\FLAG\DONE.FLG" ; Delete flag file on remote.
If $DCD != 1 GoTo @REN_FILE_LOST ; If lost connection, call next host.
SessOpr Host Run "CMD /C DEL Q:\DONE.FLG" ; Delete on host.
GoSub @LOOP ; Pause script for five seconds.
If $DCD != 1 GoTo @REN_FILE_LOST ; If lost connection, call next host.
SessOpr Host Run "CMD /C C:\ADT\RENFILE1.BAT" ; Run file
GoSub @LOOP ; Wait 5 seconds
GoSub @LOOP ; Wait another 5 seconds.
Return
the batch file runs, but I get errors such as "specified user not found: O:" or "path not found".
Drive mappings to O: and Q: are already configured when the host computer logs into the network. I even tried a "net use" to map a new drive to no avail.
If I change all network references to local c:\ references, it works fine. I even tried replacing the line that executes the batch file to SessOpr Host Run "cmd /c ren o:\*.adt *.txt" but it didn't work. Same errors.
Any ideas how to get the batch file to access the network through the script?
Al