home *** CD-ROM | disk | FTP | other *** search
- ; *****************************************************
- ; Example10.ftp
- ; =============
- ; This example WAITS until a specified REMOTE file exists
- ; on the server, and when it does, it is retrieved.
- ; -----------------------------------------------------
- ; This example also shows the use of these commands:
- ; GOTO
- ; LOCAL-COPY
- ; -----------------------------------------------------
- ; NOTE: This is just a sample - you are unable to
- ; execute the script unchanged... ;o)
- ; *****************************************************
-
- ; ******* First provide the Login information...
-
- Host="ftp.yourhost.net"
- Port=21
- User="your-username"
- Password="your-password"
-
- ; ******* Timeout in seconds...
- Timeout=60
-
- ; ******* ...and then connect to FTP host...
- connect
-
- ; ******* Command sequence...
- ; ### Wait for the file to exist...
- :CheckZone
- if remote-exists("/mymata/files/myfile.dat") then
- goto Fileexists
- endif
- ; Wait 20 seconds and then try again:
- Waitseconds "20"
- goto CheckZone
-
- :FileExists
- ; ### Wait 4 second until retrieving it... (just an example ;o)
- Waitseconds "4"
-
- Binary
- get "/mymata/files/myfile.dat" "D:\MyData\Files\Myfile.dat"
- Local-copy "D:\MyData\Files\Myfile.dat" "E:\MyData\Backup\Myfile.dat"
-
- ; ******* Afterwards, disconnect from host!
- disconnect
-
-