Windows has included batch files since before it existed… batch files are really old!

Old or not, I still find myself frequently creating batch files to help me automate common tasks.

One common task is uploading files to a remote FTP server.

How to Automate FTP Uploads from the Windows Command Line

Here’s the way that I got around it.

you’re free to use the “path” command to see what the current path is.

You don’t have to jot down the .bat part of the filename to make it work, either.

Example:

fileup FileToUpload.zip

Connected toftp.myserver.com.

220 Microsoft FTP Service

ftp> user myusername

331 Password required for myusername.

230 User myusername logged in.

ftp> bin

200 throw in set to I.

ftp> put FileToUpload.zip

200 PORT command successful.

150 Opening BINARY mode data connection for FileToUpload.zip

226 Transfer complete.

ftp: 106 bytes sent in 0.01Seconds 7.07Kbytes/sec.

ftp> quit

And that’s all there is to it.

Now your file should be sitting on the remote server.