| Products | Purchase | Support | Download | News | About |
|
|
Support - Script Examples |
|||
|
Automated Downloads Project: Write a script to login to a host computer at a certain time of the day and download a specified file. In this example, we will wait for 2:00 AM, connect and login to a Unix system, and download a file using the Zmodem protocol. Algorithm: Several items need to be either configured in a stored session file, or set dynamically via script. These include the connector and relevant connection information, userid and password to login to the system, the file transfer protocol used and any related parameters, the name of file to be transferred, and if appropriate, the name of the file to be stored locally. With this information available, the necessary steps are:
Product used in this example: DynaComm Connectivity Series® 9. (release 9.0.0.0) Relevant Commands and Functions: CONNECT — Open a session file with saved values for connector, host address, file transfer protocol, and related parameters. See Also:
CONNECT — initiate the connection and optionally open a specified SES file
SET — assigns a value to a user defined variable. (Can also use the assignment operator, =)
SEND — sends string to the host; may be used to send a command defined on the host to
initiate the transfer on the host
SHOW — Display each script command as it is executed. A Brief Example: SHOW
After defining some constants, this script sits at a WAIT UNTIL command until the specified time of day is reached and the download operation is triggered. This involves connecting the session, logging in, and sending the command to initiate the file transfer from the host side. For our case, we”ll assume the file to be retrieved is in the home directory, and the command to initiate a Zmodem download from the Unix system is “sz” followed by the filename. This initiates the file transfer from the host side. Since we are using Zmodem, the client side recognizes the file transfer and starts the download from the client side. If we were using Xmodem or Kermit or some other protocol which does not support the Autostart feature, the FILE RECEIVE BINARY command would be used to start the client side download after it had been started on the host. This example takes the easy approach of storing the settings in a Session file called “Linux.Ses” and having the script load the file when necessary. If the settings changed, such as if the session would connect to different hosts and use different protocols, it would be more appropriate to set those values dynamically. Finally, the WAIT QUIET command waits for the completion of the file transfer, the command is sent to exit the host, the connection is disconnected and the session window closed. The RESTART command is used to restart the script, so the WAIT UNTIL command will be active for the next download. Further development:
|
|||
![]() |
Purchase | Contact | Privacy Policy | Terms of Use | Sitemap | Blog |
© 2010 FutureSoft, Inc. All Rights Reserved
|
||||||
|
DynaComm i:filter |
Internet Filtering |
Employee Internet Monitoring |
Managing Internet Access |
Web Filtering |
Internet Monitoring |
DCS Terminal Emulation | TN 3270 | ProComm Plus Replacement | Windows Terminal Emulation | TN 5250 | DynaComm Connectivity Series | MultiView |
||||||