Commands to run at the FTP: prompt
append local-file [remote-file]
Append a local file to a file on the remote computer.
ascii Set the file transfer type to ASCII, the default.
In ASCII text mode, character-set and end-of-line
characters are converted as necessary.
bell Toggle a bell to ring after each command.
By default, the bell is off.
binary Set the file transfer type to binary.
Use `Binary' for transferring executable program
files or binary data files e.g. Oracle
bye End the FTP session and exit ftp
cd Change the working directory on the remote host.
close End the FTP session and return to the cmd prompt.
debug Toggle debugging. When debug is on, FTP will display
every command.
delete remote-file
Delete file on remote host.
dir [ remote-directory] [ local-file]
List a remote directory's files and subdirectories.
(or save the listing to local-file)
disconnect Disconnect from the remote host, retaining the ftp prompt.
get remote-file [ local-file]
Copy a remote file to the local PC.
glob Toggle the use of wildcard characters in local pathnames.
By default, globbing is on.
hash Toggle printing a hash (#) for each 2K data block
transferred.
By default, hash mark printing is off.
help [ command]
Display help for ftp command.
lcd [ directory]
Change the working directory on the local PC.
By default, the working directory is the directory in
which ftp was started.
literal argument [ ...]
Send arguments, as-is, to the remote FTP host.
ls [ remote-directory] [ local-file]
List a remote directory's files and folders.
(short format)
mdelete remote-files [ ...]
Delete files on remote host.
mdir remote-files [ ...] local-file
Display a list of a remote directory's files and
subdirectories.
(or save the listing to local-file)
Mdir allows you to specify multiple files.
mget remote-files [ ...]
Copy multiple remote files to the local PC.
mkdir directory
Create a directory on the remote host.
mls remote-files [ ...] local-file
List a remote directory's files and folders.
(short format)
mput local-files [ ...]
Copy multiple local files to the remote host.
open computer [ port]
Connects to the specified FTP server.
prompt Toggle prompting. Ftp prompts during multiple file
transfers to
allow you to selectively retrieve or store files;
mget and mput transfer all files if prompting is turned
off.
By default, prompting is on.
put local-file [ remote-file]
Copy a local file to the remote host.
pwd Print Working Directory
(current directory on the remote host)
quit End the FTP session with the remote host and exit ftp.
quote argument [ ...]
Send arguments, as-is, to the remote FTP host.
recv remote-file [ local-file]
Copy a remote file to the local PC.
remotehelp [ command]
Display help for remote commands.
rename filename newfilename
Rename remote files.
rmdir directory
Delete a remote directory.
send local-file [ remote-file]
Copy a local file to the remote host.
status Display the current status of FTP connections and toggles.
trace Toggles packet tracing; trace displays the route of each
packet
type [ type-name]
Set or display the file transfer type:
`binary' or `ASCII' (the default)
If type-name is not specified, the current type is
displayed.
ASCII should be used when transferring text files.
In ASCII text mode, character-set and end-of-line
characters are converted as necessary.
Use `Binary' for transferring executable files.
user user-name [ password] [ account]
Specifes a user to the remote host.
verbose Toggle verbose mode. By default, verbose is on.
! command Run command on the local PC.
? [ command] Display help for ftp command.
“Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the
rest of the world mirror it” - Linus Torvalds
FTYPE
Display or change the link between a FileType and an executable program
Syntax
FTYPE fileType= executable_path
FTYPE
FTYPE fileType
FTYPE fileType=
Key
fileType : The type of file
executable_path : The executable program including any command line
parameters
More than one file extension may be associated with the same File Type.
e.g. both the extension .JPG and the extension .JPEG may be associated with the File Type
"jpegfile"
File Types can be displayed in the Windows Explorer GUI under Options, File Types however
the naming used is not consistent e.g. the File Type "txtfile" is displayed in the GUI as "Text
Document"and "jpegfile" is displayed as "image/jpeg"
Several FileTypes can be linked to the same executable application.
FTYPE filetype
will display the current executable program for that file type e.g.
FTYPE
jpegfile
.
FTYPE
without any parameters will display all FileTypes and the executable program for each.
Defining command line parameters
It is almost always necessary to supply command line parameters so that when a document is
opened not only is the relevant application loaded into memory but the document itself also
loaded into the application. To make this happen the filename of the document must be passed
back to the application.
Command line parameters are exactly like
batch file parameters
, %0 is the executable program
and %1 will reference the document filename
so a simple command line might be:
MyApplication.exe "%1"
If any further parameters are required by the application they can be passed as %2, %3. To
pass ALL parameters to an application use %*. To pass all the remaining parameters starting
with the nth parameter, use %~n where n is between 2 and 9.
The FileType should always be created before making a File Association
For example:
FTYPE htmlfile="C:\PROGRA~1\Plus!\MICROS~1\iexplore.exe" -nohome
ASSOC .html=htmlfile
FTYPE pagemill.html=C:\PROGRA~1\Adobe\PAGEMI~1.0\PageMill.exe "%1"
ASSOC .html=pagemill.html
FTYPE rtffile="C:\Program Files\Windows NT\Accessories\WORDPAD.EXE"
"%1"
ASSOC .rtf=rtffile
FTYPE word.rtf.8="C:\Program Files\Microsoft Office\Office\winword.exe"
/n
ASSOC .rtf=word.rtf.8
Switch between multiple applications
If you have multiple applications that use the same file extension, the
ASSOC
command can be
used to switch the file extension between the different FileTypes.
Delete a FileType
Specify
Chia sẻ với bạn bè của bạn: |