Download FTP_UPD.PLX

The system is very similar to FTP_SUCK except that instead of deleting files from the FTP_SERVER after they have been downloaded the system just downloads the files that are not currently on the local PC.

Please note that this means that the local server MUST keep the data for at least as long as they are on the remote server, otherwise it will be downloaded again. (Use create to make zero lengths files to avoid this)

The FTP_UPD system is designed to download all new files files from a given directory on a FTP server. The is the equivalent of doing a UPDATE or COPY

Usage FTP_UPD.BAT server username password remote_directory local_directory [Not_ZIP]

For example

FTP_UPD ftp.trimble.com anonymous Grk@Trimble.Lan /pub/to_tac/gkirk/sm01 C:\TRSDATA

If the extra parameter <Not_ZIP> is on the command line then no checking of the files will be done. If it is not there, then the file will be checked for errrors in the ZIP file. If there are errors then the file will automatically be deleted.

The system has three components the main batch file that does all the work

FTP_UPD.BAT which does the wrapping of the system

FTP_UPD.PLX perl program that which processes a directory listing into a format that can be used to download

ZIP_TEST.AWK creates the batch file for the testing of the files.

Normally you will just want to download the files into the directory that you want them stored in, (the files are downloaded into the current directory). If you need to do some processing on the files that will rename the file you need to make a holder file in the download directory so that the files are not downloaded again.

The GetMnDot.BAT is a sample 4DOS batch file that shows this.

It shows moveing all the files to a “download directory”

processing the files and leaving a holder 0 length file in the directory. Not that use of the /[s1] which means only process files that are 1 byte or longer.

For people not using 4dos, a equally valid way of doing this would be to have for loop that goes over the downloaded files and moves them to the “download” directory and does the processing.