echo off rem *--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* rem *** FILE: rem *** ~matth3bishop/BatchScripts/getf.txt rem *** DESCRIPTION: rem *** This batch program automates the rem *** process of downloading a file from the rem *** Yahoo Geocities ftp server for the rem *** website at rem *** http://www.geocities.com/matth3wbishop rem *** The script uses ascii mode by default rem *** Add the -a switch when behind a firewall rem *** and when your ftp program supports the -a rem *** or -passive (linux) switch rem *** PARAMETERS: rem *** 1st: the file to upload. This parameter rem *** can also be '*' to indicate that all rem *** files in the specified directory should rem *** be downloaded from the 'matth3wbishop' account rem *** on the Geocities ftp server. However no rem *** other 'globbing' is allowed at present. rem *** 2nd: is a subdirectory rem *** 3rd: allows the file to be uploaded rem *** in binary mode (eg MS Word Documents) rem *** EXAMPLES: rem *** Example 1: rem *** 'getf SomeTextFile.txt' gets the file named rem *** SomeTextFile.txt from the home directory of rem *** the 'matth3wbishop' geocities site using the rem *** Ascii mode of transfer. rem *** The url of the file will be rem *** http://www.geocities.com/matth3wbishop/SomeTextFile.txt rem *** Example 2: rem *** 'getf index.html Resumes' downloads an html rem *** file from the Resumes subdirectory on the rem *** matth3wbishop geocities site. Its url will be rem *** http://www.geocities.com/matth3wbishop/Resumes/index.html rem *** or just rem *** http://www.geocities.com/matth3wbishop/Resumes rem *** Example 3: rem *** 'getf aLetter.doc cv -binary' rem *** downloads the Microsoft Word document aLetter.doc rem *** from the cv subdirectory on the matth3wbishop site rem *** using binary mode. -b and -bin are also rem *** acceptable aliases. rem *** Example 4: rem *** 'getf aLetter.doc . -b' rem *** downloads the MS word Document from the home rem *** directory of the 'matth3wbishop' site on rem *** Yahoo Geocities and uses the binary mode rem *** NOTES: rem *** The file needs to be renamed to rem *** getf.bat for it to run under Windows/DOS rem *** AUTHOR: rem *** m.j.bishop (matth3wbishop@yahoo.com) rem *** TESTING: rem *** Win95 Appears to work rem *** SEE ALSO: rem *** ~matth3wbishop/BatchScripts/putf.txt rem *** uploads a file to the 'matth3wbishop' geocities rem *** Web-Site rem *** ~matth3wbishop/BatchScripts/logonYahoo.txt rem *** Logs onto the same site (WinMe, Win98 only) rem *--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* echo on @rem *** @rem *** create the ftp script file @rem *** echo user matth3wbishop bacibaci > ftpABC.txt echo hash >> ftpABC.txt echo ascii >> ftpABC.txt echo prompt >> ftpABC.txt @if not "%2"=="" echo cd %2 >> ftpABC.txt @if "%3"=="-b" echo binary >> ftpABC.txt @if "%3"=="b" echo binary >> ftpABC.txt @if "%3"=="-bin" echo binary >> ftpABC.txt @if "%3"=="bin" echo binary >> ftpABC.txt @if "%3"=="-binary" echo binary >> ftpABC.txt @if "%3"=="binary" echo binary >> ftpABC.txt echo ddd%1ddd if "%1"=="*" echo mget * >> ftpABC.txt if not "%1"=="*" echo get %1 >> ftpABC.txt @rem *** @rem *** Logon & transfer (download) the file @rem *** if not "%1"=="" ftp -n -s:ftpABC.txt ftp.geocities.com @rem *** When behind a firewall use the following line @rem *** ftp -n -s:ftpABC.txt -a ftp.geocities.com del ftpABC.txt @if "%1"=="" echo *--*--*--*--*--*--*--*--*--*--* @if "%1"=="" echo Dear User, @if "%1"=="" echo You did not specify any parameters @if "%1"=="" echo for this batch script. This script @if "%1"=="" echo downloads a file from the 'matth3wbishop' @if "%1"=="" echo Yahoo Geocities server which has a url of @if "%1"=="" echo http://www.geocities.com/matth3wbishop/ @if "%1"=="" echo .. @if "%1"=="" echo Usage: getf filename [subdirectory] [-binary] @if "%1"=="" echo .. @if "%1"=="" echo Please see the comments in the batch @if "%1"=="" echo file for more information @if "%1"=="" echo about how to use this script @if "%1"=="" echo *--*--*--*--*--*--*--*--*--*--*