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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

naming downloaded file

Status
Not open for further replies.

agua00

Technical User
Jul 13, 2004
5
US

I have a command which is called $$REQ ID-> its looks for files that need to be downloaded. when i run this in procomm currently i hit the download folder and then name the file.
how do you download the file and then name it in the script file?


tia
 
What transfer protocol are you using? If it is not Zmodem or Kermit, then you can easily specify the filename in the script. Otherwise, you have to jump a couple hoops since Zmodem and Kermit pass the filename information along at the beginning of the transfer.


aspect@aspectscripting.com
 
I am using protocol 1K-Xmodem. I am thinking after I run my $$REQ ID then I should run the getfile 1K-Xmodem command. follow by the rest of my script.
 
Here is a modified example from my site that shows you how to receive the file and do a little error-checking after the fact (change filename to the path and filename you want the file to be called on your local machine):

proc main
integer iStatus

getfile 1KXMODEM "filename"
iStatus = $XFERSTATUS
while iStatus == 1
iStatus = $XFERSTATUS
endwhile
if iStatus == 2
;Transfer successful, continue with script execution
elseif iStatus == 3
;Transfer failed, perform error handling
endif
endproc

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top