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!

getfile syntax

Status
Not open for further replies.

petcvlcj

IS-IT--Management
Dec 27, 2002
2
US

Trying to use getfile to complete kermit file transfer to a directory location other than default procomm download folder.

My current syntax is...

transmit "/usr/local/bin/kermit -s sys.fin.dy^M"
pause 3
getfile 1 "C:\Reports\Steakhouse\Fri"
waitfor "# "

Any suggestions?!?
 
That looks OK, what happens when you try to run the script? My hunch is that you're experiencing problems since you are not waiting until file transfer has been completed. You will want to create a loop that checks the value of the $XFERSTATUS system variable to determine the state of the download. If you go to the first sample script shows how this loop should be constructed. The particular example script is for a Zmodem download, but the loop is applicable for your Kermit transfer as well.
aspect@aspectscripting.com
 

When the script is run, the file transfers successfully and the script waits for the command prompt to return before executing the next script command...unfortunately the file is placed in the procomm download folder.

My other option that has tested successfully was to execute the following command before initiating the transfer...

set dnldpath "C:\Reports\Steakhouse\Fri"

waitfor "# "
transmit "cd /usr/8700/reports/Fri^M"
waitfor "# "
transmit "/usr/local/bin/kermit -s sys.fin.dy^M"
pause 3
getfile 1
waitfor "# "
transmit "^M"
waitfor "# "
transmit "^M"
waitfor "# "
transmit "exit^M"

Are there any system specific settings or additional syntax for the getfile command that I should attempt. Otherwise, I will work with the "set dnldpath" command.

Thanks!

 
I haven't had a chance to test this yet (but hopefully will later tonight), but try removing the pause 3 in your original script. My hunch is that the Kermit transfer is starting before your getfile command (because Kermit is an auto-start transfer protocol, as is Zmodem), thus the getfile command is basically being ignored. If that doesn't work, you could try turning off the auto-start capability. To do, select the Options | Data Options | Advanced menu item in Procomm, uncheck the Enable automatic download start for Zmodem and Kermit checkbox, then click the OK button. With this box unchecked, the transfer will not start automatically and the path in the getfile command should be honored.
aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top