Command-line arguments (Client): Difference between revisions

From FileZilla Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
== FileZilla Client 3.x Command-Line Arguments ==
== FileZilla Client Command-Line Arguments ==


support only the /h parameter (help) and --verbose option
=== Synopsis ===


== FileZilla Client 2.x Command-Line Arguments ==
filezilla [<FTP URL>]
 
filezilla -s
FileZilla Client does support some basic command-line arguments, but it's primarily a GUI application and as such isn't meant to do scripting/automation. Some functionality is nevertheless available through the command-line.
filezilla -c <site>
 
=== Standard Synopsis ===
<ul>
<li>filezilla.exe <URL> [-du] <sourcefile> <targetdir> [-t] <targetname></li>
<li>filezilla.exe -s <name of site in Site Manager></li>
</ul>
 
=== Description ===
<ul>
<li>filezilla.exe [<protocol>://]<username>:<password>@<host>[:port]<br />
Used to connect to a host running a ftp server. The optional protocol can either be ftp://, sftp:// or ftps:// and defaults to ftp://. The port is optional. If it is ommited, the port defaults to 21 for ftp://, 22 for sftp:// and 990 for ftps://.
</li>
 
<li>filezilla.exe -s <name of site in Site Manager><br />
Used to connect to a host that is defined in the Site Manager of the program. The name of the site is case sensitive.
</li>
 
<li>filezilla.exe [-du] <sourcefile> <targetdir> [-t] <targetname><br />
Used to download (-d) or upload (-u) a file from/to the host.
</li>
 
</ul>
 
=== User Commands ===
The supported user commands are:
<ul>
 
<li>URL<br />
  You can specify an URL FileZilla connect to when started.
</li>
<li>-s <name of site in Site Manager><br />
  Specifies an already defined site in the Site Manager that FileZilla tries to connect to when started.
</li>
<li>
-d <sourcefile> <targetdir><br />
  Downloads the specified file from the server into the target dir.
</li>
<li>
-u <sourcefile> <targetdir><br />
  Uploads the specified file into the target dir on the server. <sourcefile> has to be the full path of the file.
</li>
<li>
-t <targetname><br />
  Only valid together with -u or -d: Specifies an alternate name for the target file. Must come directly after one of -u or -d.
</li>
<li>
-quit <br />
Shuts down all running instances of FileZilla. Must be used solely; can't be combined with any of the other arguments.
</li>
<li>
-i <br />
Imports a Site Manager .xml file.
</li>
</ul>
 
Remarks:
You can not use -s as argument to either -u or -d. Both -u and -d expect a full hostname.


=== Options ===
=== Options ===


<ul>
*-s, --sitemanager
<li>
<blockquote>
-close <br />
Start with Site Manager opened.
  Will close FileZilla after all transfers have finished.
May not be used together with -c nor with URL parameter.
</li>
</blockquote>
<li>
-config <configfile> <br />
  Loads the file specified as configuration for the program. If used it has to be the first argument to FileZilla.
</li>
<li>
-overwrite <br />
To set the fileexists action to overwrite.
</li>
</ul>
 
=== Example (version 2.2.29) ===
<nowiki>filezilla.exe -s "Remote Site" -u "c:\ftp\TestFile.txt" ftp://ftp_user:ftp_password@ftp_host_ip/test_stuff -close</nowiki>


<ul>
*-c, --site
<li>
<blockquote>
...will connect to the site "Remote Site" (-s) defined in Site Manager and Upload (-u) the local file "c:\ftp\TestFile.txt" into remote folder "test_stuff"; when the transfer is complete, close FileZilla.</li>
Connect to the given site from the Site Manager. Site has to be given as complete path, with a slash as separation character. Any slash or backslash that is part of a segment has to be escaped with a backslash.
<li>FileZilla 2.2.29 command line transfer does not support Wildcards/Subdirectory specifications (i.e. \* or \*.*) will not work to transfer all folders/files; only single file transfers are allowed.</li>
Path has to be prefixed with 0 for user defined entries or 1 for default entries.
</ul>
Site path may not contain double quotation marks.


=== Example (version 2.2.29) ===
              Example: 0/foo/bar/sl\/ash  connects to the user site sl/ash in
<nowiki>c:\filezilla\filezilla.exe -u ".\filename.mpg" ftp://ftp_user:ftp_passwor@10.0.0.3:2002/test_stuff -close</nowiki>
              the site directory foo/bar
              Start with Site Manager opened.
              May not be used together with -s nor with URL parameter.
              May not be used together with -c nor with URL parameter.----
</blockquote>


<ul>
*--close ''(Windows only)''
<li>
<blockquote>
...will connect to the ip 10.0.0.3 at port 2002 (note, we are not using a predefined Site) and Upload (-u) the local file "filename.mpg" from the current directory, into remote folder "test_stuff"; when the transfer is complete, close FileZilla.</li>
Closes all running instances of FileZilla.
</ul>
</blockquote>


=== Example (version 2.2.30) ===
=== Example ===
<nowiki>filezilla.exe -close -overwrite -d ftp://ftp_user:ftp_password@ftp_host_ip/test_file.txt "c:\targetdirectory"</nowiki>


...will connect to the site ftp_host_ip and Download (-d) server file 'test_file.txt' into local folder "targetdirectory"; when the transfer is complete, close FileZilla and if the file already exists overwrite it automatically.
If you want to connect from the command-line to the site named '''Backup server''' in the directory '''foo/bar''', the command is:
filezilla -c "0/foo\/bar/Backup server"

Revision as of 13:14, 24 May 2008

FileZilla Client Command-Line Arguments

Synopsis

filezilla [<FTP URL>]
filezilla -s
filezilla -c <site>

Options

  • -s, --sitemanager

Start with Site Manager opened. May not be used together with -c nor with URL parameter.

  • -c, --site

Connect to the given site from the Site Manager. Site has to be given as complete path, with a slash as separation character. Any slash or backslash that is part of a segment has to be escaped with a backslash. Path has to be prefixed with 0 for user defined entries or 1 for default entries. Site path may not contain double quotation marks.

Example: 0/foo/bar/sl\/ash connects to the user site sl/ash in the site directory foo/bar Start with Site Manager opened. May not be used together with -s nor with URL parameter. May not be used together with -c nor with URL parameter.----

  • --close (Windows only)

Closes all running instances of FileZilla.

Example

If you want to connect from the command-line to the site named Backup server in the directory foo/bar, the command is:

filezilla -c "0/foo\/bar/Backup server"