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 on the Yahoo Geocities rem *** ftp Server in the 'matth3wbishop' account. rem *** if an invalid Directory name is specified rem *** (and the folder names are all case-sensitive) rem *** the file is placed in the home Directory of rem *** the 'matth3wbishop' account. rem *** rem *** Currently the files are all put into the Home rem *** directory in the 'janebishop' account on the rem *** Telstral BigPond Web Hosting ftp Server. rem *** 3rd: allows the file to be uploaded rem *** in binary mode (eg MS Word Documents or Images) rem *** Legal values for this parameter include '-b' rem *** '-binary' 'binary' or 'b'. (But not '/b' yet) 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 *** and also uploads the specified file to the Telstra rem *** bigPond Server for the 'janebishop' account into the rem *** /mjb sub-directory. The url of this file will then be rem *** http://www.users.bigpond.com/janebishop/mjb/index.html 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. And also into the /mjb subdirectory rem *** of the 'janebishop' Telstra account. -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 *** These scripts (see 'see also:' below) are reallly a rem *** security risk since they are sending plain text rem *** passwords across the internet and storing those rem *** same passwords unencrypted in a text file. 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 *** Puts a file into the /mjb sub-directory rem *** on the 'janebishop' account of the rem *** Tesltra bigpond Web Hosting Server. rem *** ~matth3wbishop/BatchScripts/getScripts.txt rem *** Gets all the utility batch scripts which rem *** reside in the Batch Scripts subdirectory of the rem *** 'matthe3wbishop' account on the Yahoo rem *** Geocities ftp Web Hosting Server. 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 *** ~matth3wbishop/BatchScripts/logonYahoo.txt rem *** ~matth3wbishop/BatchScripts/ly.txt rem *** These scripts are designed to log onto rem *** Yahoo Geocities Server for the 'matth3wbishop' rem *** account but they only work on some version of the rem *** Microsoft Ftp program. 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 (%0) @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 *--*--*--*--*--*--*--*--*--*--*