Difference between revisions of "Command-line arguments (Client)"

From FileZilla Wiki
Jump to navigationJump to search
m
 
(198 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
== FileZilla Client 2.x Command-Line Arguments ==
+
These are the command-line arguments for [[FileZilla FTP Client|FileZilla Client]]. The Server command-line arguments can be found under [[Command-line arguments (Server)]].
 +
If you are looking for a command-line version of FileZilla, check out [https://filezillapro.com/cli/ FileZilla Pro CLI].
  
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 Client command-line arguments ==
  
=== Standard Synopsis ===
+
=== 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 ===
+
filezilla [<FTP URL>]
<ul>
+
filezilla -h, --help
<li>filezilla.exe [<protocol>://]<username>:<password>@<host>[:port]<br />
+
filezilla -s, --site-manager
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://.
+
filezilla -c, --site=<string>
</li>
+
filezilla -l, --logontype=<string>
 +
filezilla -a, --local=<string>
 +
filezilla --close
 +
filezilla --verbose
 +
filezilla -v, --version
  
<li>filezilla.exe -s <name of site in Site Manager><br />
+
=== Options ===
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 />
+
*<FTP URL>
Used to download (-d) or upload (-u) a file from/to the host.
+
<blockquote>
</li>
+
Accepts all URLs of the form
  
</ul>
+
<pre>[protocol://][user[:pass]@]host[:port][/path]
 +
eg.  sftp://username:password@server:port</pre>
  
=== User Commands ===
+
Valid protocols are '''ftp://''' (the default if omitted), '''ftps://''', '''ftpes://''' and '''sftp://'''
The supported user commands are:
+
</blockquote>
<ul>
 
  
<li>URL<br />
+
*-h, --help
  You can specify an URL FileZilla connect to when started.
+
<blockquote>
</li>
+
Shows the help dialog.
<li>-s <name of site in Site Manager><br />
+
</blockquote>
  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:
+
*-s, --sitemanager
You can not use -s as argument to either -u or -d. Both -u and -d expect a full hostname.
+
<blockquote>
 +
Start with opened Site Manager.
 +
<br /><br />
 +
May not be used together with -c nor with URL parameter.
 +
</blockquote>
  
=== Options ===
+
*-c, --site=&lt;string&gt;
 
+
<blockquote>
<ul>
+
Connect to specified Site Manager site.
<li>
+
<br /><br />
-close <br />
+
Site name requirements:
  Will close FileZilla after all transfers have finished.
 
</li>
 
<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) ===
 
 
<ul>
 
<ul>
<li>filezilla.exe -s "Remote Site" -u "c:\ftp\TestFile.txt" ftp<b></b>://ftp_user:ftp_password@ftp_host_ip/test_stuff -close<br />
+
    <li>Site has to be given as complete path, with a slash as separation character.</li>
...will connect to the site "Remote Site" (-s) defined in Site Manager and Upload (-u) local file "c:\ftp\TestFile.txt" into remote folder "test_stuff"; when transfer is complete, close FileZilla.</li>
+
    <li>Any slash or backslash that is part of a segment has to be escaped with a backslash.</li>
<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>
+
    <li>Path has to be prefixed with 0 for user defined entries or 1 for default entries.</li>
</ul>
+
    <li>Site path may not contain double quotation marks.</li>
 
+
</ul>  
 
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 +
Example:
 +
<pre>filezilla --site="0/foo/bar/sl\/ash"</pre>
 +
Connects to the user site "sl/ash" in the site directory "foo/bar".
  
  
 +
</blockquote>
  
 +
*-l, --logontype=(ask|interactive)
 +
<blockquote>
 +
Logon type, can only be used together with FTP URL. Argument has to be either 'ask' or 'interactive'.
 +
<br /><br />
 +
FileZilla will ask for any logon information not supplied in the FTP URL before connecting. Useful for custom scripts or shortcuts.
 +
</blockquote>
  
  
 +
*-a, --local=&lt;string&gt;
 +
<blockquote>
 +
Sets the local site (left-hand side) to the given path. '''(Requires version 3.7.1-rc1 or higher)'''
 +
<br /><br />
 +
Use double quotation for paths with spaces in them.
 +
<br /><br />
  
 +
Example:
 +
<pre>filezilla --site="0/site1" --local="C:\site1 downloads"
 +
filezilla ftp://username:password@ftp.example.com --local="C:\server2 downloads"</pre>
 +
Connects to the user site "site1" and sets the local folder to '''C:\site1 downloads'''.
  
 +
Connects to server2 URL and sets the local folder to '''C:\server2 downloads'''.
  
 +
</blockquote>
  
  
 +
*--close ''(Windows only)''
 +
<blockquote>
 +
Closes all running instances of FileZilla.
 +
</blockquote>
  
 +
*--verbose
 +
<blockquote>
 +
Verbose log messages from wxWidgets.
 +
</blockquote>
  
 +
*-v, --version
 +
<blockquote>
 +
Print version information to stdout and exit.
 +
</blockquote>
  
<div  style="display:none">
+
=== Example ===
[l_sp_33]
 
[http://www.dwarf.name/263 Biffy Clyro Puzzle mp3 download]
 
[http://www.dwarf.name/264 Rush Snakes and Arrows mp3 download]
 
[http://www.dwarf.name/265 John Mayer Continuum mp3 download]
 
[http://www.dwarf.name/266 The Arcade Fire Neon Bible mp3 download]
 
[http://www.dwarf.name/267 James Morrison Undiscovered mp3 download]
 
  
 +
[[Image:Cmdline argument example.png]]
  
</div>
+
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"

Latest revision as of 19:30, 6 March 2024

These are the command-line arguments for FileZilla Client. The Server command-line arguments can be found under Command-line arguments (Server). If you are looking for a command-line version of FileZilla, check out FileZilla Pro CLI.

FileZilla Client command-line arguments

Synopsis

filezilla [<FTP URL>]
filezilla -h, --help
filezilla -s, --site-manager
filezilla -c, --site=<string>
filezilla -l, --logontype=<string>
filezilla -a, --local=<string>
filezilla --close
filezilla --verbose
filezilla -v, --version

Options

  • <FTP URL>

Accepts all URLs of the form

[protocol://][user[:pass]@]host[:port][/path]
eg.  sftp://username:password@server:port

Valid protocols are ftp:// (the default if omitted), ftps://, ftpes:// and sftp://

  • -h, --help

Shows the help dialog.

  • -s, --sitemanager

Start with opened Site Manager.

May not be used together with -c nor with URL parameter.

  • -c, --site=<string>

Connect to specified Site Manager site.

Site name requirements:

  • 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:

filezilla --site="0/foo/bar/sl\/ash"

Connects to the user site "sl/ash" in the site directory "foo/bar".


  • -l, --logontype=(ask|interactive)

Logon type, can only be used together with FTP URL. Argument has to be either 'ask' or 'interactive'.

FileZilla will ask for any logon information not supplied in the FTP URL before connecting. Useful for custom scripts or shortcuts.


  • -a, --local=<string>

Sets the local site (left-hand side) to the given path. (Requires version 3.7.1-rc1 or higher)

Use double quotation for paths with spaces in them.

Example:

filezilla --site="0/site1" --local="C:\site1 downloads"
filezilla ftp://username:password@ftp.example.com --local="C:\server2 downloads"

Connects to the user site "site1" and sets the local folder to C:\site1 downloads.

Connects to server2 URL and sets the local folder to C:\server2 downloads.


  • --close (Windows only)

Closes all running instances of FileZilla.

  • --verbose

Verbose log messages from wxWidgets.

  • -v, --version

Print version information to stdout and exit.

Example

Cmdline argument example.png

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"