|
Automating Your FTP Session
- Are you trying to connect during peak hours? Web and FTP downloads will be slower during peak hours (11am - 3pm Monday through Friday, Eastern Time). Try scheduling your downloads for non-peak hours. Automating is easy if you are using Windows NT or Windows 95.
Here is one way to automate FTP downloads. Automating downloads has two main steps:
- Make a script to perform the ftp portion of the transaction
- Schedule the script file to run at a pre-set time
- Step One: Write the ftp script file
Here is a simple 7-line script file: open ftp.commandcom.com
user username
password
cd products/commercial/f-prot95
bin
get fpcurrent.zip
bye
Here is an explanation of each line:
open ftp.commandcom.com indicates the server you are connecting to
user username sends your username
password sends your password
cd products/commercial/f-prot indicates the directory path you want to use
bin changes the mode to binary
get fpcurrent.zip indicates what file you want to get
bye disconnects
exit exits from DOS Users should write the script in Notepad or other text editor, save it as a .ftp file, for example, then modify the text file to show their own variables, paths, passwords, multiple files, etc.
- Step Two: Schedule the script file to run
Windows NT
It is possible to use the "AT" command in WinNT to schedule jobs. Here are the guidelines for using AT:
a. The Schedule service must be running to use the AT command (go to Control Panel|Services to start the Schedule service)
b. The first time you set the AT command, you should type something like this:
C:\> AT 3am /next:Thursday "ftp -n -s:autoftp.ftp"
Where you are following these guidelines:
/every:date [,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.
c. To see the scheduled jobs on your local machine, just type:
C:\> AT
Status ID Day Time Command Line
----------------------------------------------------
0 Next Th 3:00 AM "ftp -n -s:autoftp.ftp"
1 Next Tu 3:00 AM "ftp -n -s:autoftp.ftp"
Windows 95
To schedule jobs in Windows 95, use the System Agent.
NOTE:
No matter which scheduling tool you use, do not forget to disable the schedule after its use. In most cases, you won't want the scheduled program to run more than once.
Home � Purchase Center � Virus Center � Support Center
|
|
|