Class MakeFtp
java.lang.Object
MakeFtp
- public class MakeFtp
- extends java.lang.Object
Method Summary |
java.lang.String[] |
generateScripts()
Creates an ftp script file and a bat file which calls the
script file, naming each with suffix inserted in the name. |
java.util.ArrayList |
getCoreCommands()
Creates an ftp script file and a bat file which calls the
script file, naming each with suffix inserted in the name. |
static void |
main(java.lang.String[] args)
Syntax:
|
void |
makeWin98Bat()
|
void |
runScripts()
|
void |
setGenAndRun(boolean state)
|
void |
setMax(int max)
|
void |
setSuffix(java.lang.String suffix)
|
void |
setTotal(int tot)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MakeFtp
public MakeFtp()
setGenAndRun
public void setGenAndRun(boolean state)
setMax
public void setMax(int max)
setSuffix
public void setSuffix(java.lang.String suffix)
setTotal
public void setTotal(int tot)
generateScripts
public java.lang.String[] generateScripts()
- Creates an ftp script file and a bat file which calls the
script file, naming each with suffix inserted in the name.
If the suffix is a, the files are named _a1.scr and _a.bat.
It returns two Strings: the suffix of all scripts (e.g. x in _x6.scr)
and the total number of scripts (e.g. 12).
makeWin98Bat
public void makeWin98Bat()
getCoreCommands
public java.util.ArrayList getCoreCommands()
- Creates an ftp script file and a bat file which calls the
script file, naming each with suffix inserted in the name.
If the suffix is a, the files are named _a1.scr and _a.bat.
runScripts
public void runScripts()
main
public static void main(java.lang.String[] args)
- Syntax:
Generating:
java MakeFtp [-do] [ -n numPerFile ] [ suffix ]
Running:
java MakeFtp -total -run [ suffix ]
-do: generate AND run the upload scripts
-n : the max number of files to be uploaded per
ftp script
suffix: a unique ending for the script files (default: files
would be named _1.scr, _2.scr; with suffix x, files would be
named _x1.scr, _x2.scr
-total : how many of the script files are to be run
Examples:
Generate _.bat to upload default number of files per group:
java MakeFtp
Generate _x.bat to upload default number of files per group:
java MakeFtp x
Generate _.bat to upload 15 files per gruop:
java MakeFtp -n 15
Generate _x.bat to upload 15 files per gruop:
java MakeFtp -n 15 x
Run the first script (_1.scr):
java MakeFtp -total 1 -run
Run the first three scripts:
java MakeFtp -total 3 -run
Run the first script with suffix x (_x.scr):
java MakeFtp -total 1 -run x
Design intent: java MakeFtp -do, to start an upload;
java MakeFtp x, to create additional upload file instructions
without interfering with current upload