echo off rem *--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* rem *** FILE: rem *** ~matth3bishop/BatchScripts/pushf.txt rem *** DESCRIPTION: rem *** This batch program automates the rem *** process of putting a file on to the rem *** Yahoo Geocities ftp server for the rem *** website at (as well as BigPond) rem *** http://www.geocities.com/matth3wbishop rem *** The script puts the file(s) into the home rem *** directory and uses ascii-mode by default. rem *** The first parameter is the file to put rem *** onto the geocities server. 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 also allows rem *** the '*' wildcard character for all files rem *** to be uploaded. 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 *** 'pushf SomeTextFile.txt' puts the file named rem *** SomeTextFile.txt into the home directory of rem *** the 'matth3wbishop' geocities site rem *** The url of the file will be rem *** http://www.geocities.com/matth3wbishop/SomeTextFile.txt rem *** Example 2: rem *** 'pushf index.html Resumes' uploads an html rem *** file into 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 *** 'pushf aLetter.doc cv -binary' rem *** uploads the Microsoft Word document aLetter.doc rem *** into the cv subdirectory on the matth3wbishop site rem *** using binary mode. -b and -bin are also rem *** acceptable aliases. rem *** NOTES: rem *** The file needs to be renamed to rem *** pushf.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/getf.txt rem *** ~matth3wbishop/BatchScripts/getBigP.txt rem *** ~matth3wbishop/BatchScripts/putBigP.txt rem *** ~matth3wbishop/BatchScripts/getScripts.txt rem *** ~matth3wbishop/BatchScripts/putIndex.txt rem *** this is an older version of the pushf rem *** Batch script which only gets the index.html rem *** file from the home directory. rem *** 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 if "%1"=="*" echo mput %1 >> ftpABC.txt if not "%1"=="*" echo put %1 >> ftpABC.txt @rem *** @rem *** Logon & transfer 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 echo user janebishop magicfootball > ftpABC.txt echo hash >> ftpABC.txt echo ascii >> ftpABC.txt echo prompt >> ftpABC.txt echo cd mjb >> 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 if "%1"=="*" echo mput %1 >> ftpABC.txt if not "%1"=="*" echo put %1 >> ftpABC.txt @rem *** @rem *** Logon & transfer the file @rem *** if not "%1"=="" ftp -n -s:ftpABC.txt ftp.users.bigpond.com @rem *** When behind a firewall use the following line @rem *** ftp -n -s:ftpABC.txt -a ftp.users.bigpond.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. @if "%1"=="" echo .. @if "%1"=="" echo Usage: pushf 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 *--*--*--*--*--*--*--*--*--*--*