How do I send a file with FileZilla from the command line?

26

6

I have a batch file that builds an application, and then I want to upload it to an FTP server from the command line.

Considering I do the upload manually with FileZilla, is there a command line for it to upload files?

I am limited to Windows.

Gabi Diaconescu

Posted 2011-01-31T08:50:02.583

Reputation: 375

Answers

28

FileZilla does not have any command line arguments (nor any other way) that allow automatic transfer. See:
Command-line arguments (Client)
https://trac.filezilla-project.org/ticket/2317


Though you can use any other FTP client that allows automation.

For example, WinSCP:
https://winscp.net/eng/docs/guide_automation

A typical WinSCP script (script.txt) for upload looks like:

open ftp://user:password@example.com/
put c:\files\*.* /home/user/
exit

To run the script use:

WinSCP.com /ini=nul /log=ftp.log /script=script.txt

The WinSCP can generate a script from an imported FileZilla session.

For details, see the guide to FileZilla automation.

(I'm the author of WinSCP)

Martin Prikryl

Posted 2011-01-31T08:50:02.583

Reputation: 13 764

1

Extra kudos for providing the .NET assembly for WinSCP https://winscp.net/eng/docs/library :)

– Sverrir Sigmundarson – 2016-10-06T22:13:36.907

3

You can use Window's built-in FTP client to do this. You don't need FileZilla.

ftp
open *computer_name*
send *local_file* {remote file}

bruno077

Posted 2011-01-31T08:50:02.583

Reputation: 867

Can you specify the relevant FTP commands in a batch file? Or only interactively through the console? – Simon East – 2015-12-14T04:07:51.663

@SimonEast Yes, see here.

– Malcolm – 2016-01-15T16:57:01.453

1

There is no command line for FileZilla to upload files, but you can use ftp (man ftp) or possibly cURL (man curl) generally using an SSH connection.

On Linux you have much more access to options than on windows, but you could install Cygwin to make Windows better.

I hope this helps. Learning the command line is very time-saving - there are things you can do with it that would take ages using a GUI.

palbakulich

Posted 2011-01-31T08:50:02.583

Reputation: 545

1

You should be able to use an FTP command-line program such as PSFTP. Please note PSFTP does not use passive mode and therefore requires a data connection for LAN FTP.

Al Serize

Posted 2011-01-31T08:50:02.583

Reputation: 11