Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PcAnywhere script problem 1

Status
Not open for further replies.

amurin

MIS
Jun 24, 2003
2
0
0
US
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
 
Hi

I am having the exact same problem

Did you ever get a fix for this and would you share this with me

Peter
 
No we never were able to specifically resolve this. We wound up convincing the client to concatenate all the individual files to a single file, and let us use FTP for the transfer process.

Al
 
Hi,
I also had the same problem until I added the following at the beginning of the batch file:

net use m: \\the\volume\path\to_map_to /user:name password

(a valid user name and password for novell)

Hope this helps.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top