Categories: Internet

How to Automate FTP Upload from the Windows Command Line

Using batch files on your Windows makes the work on our Computer much easier and personally I find myself creating the batch files quite often because it makes my work much easier and one of the most common use of this batch files is uploading files the remote FTP servers and also this batch files helps you to automate common tasks.

So here we will walk through the tutorial on how to automate FTP upload from the Windows Command line. So here is what you will need to do to make this thing work.

But if you are new to this FTP Upload then here are some of the basic things you will need to know about this FTP.

What is FTP?

FTP generally stands for File Transfer Protocol is a standard network protocol used to transfer the computer files from one host to another host over a TCP-based network such as the Internet.

And the most common way to upload through the File Transfer Protocol is using the Windows Command Line.

So here are things you need to follow to automate FTP upload from the Windows Command Line.

Weebly will be helping you to upload and create your websites without FTP. And all that, with simple drag and drop options. And you will be able to create whatever you want, with really simple s. There are many options for free accounts, and paid options as well. If you want to buy yourself a paid one, get and use this weebly coupon and save your money right off the bat.

Automate FTP Upload from the Windows Command Line:

First of all you will need to create a file called fileup.bat in your Windows directory or any of your directories on your path and you can use the “path” command to know your current path.

To create the bat file you will need to copy the below text in your Notepad and save it as fileup.bat.

Copy The Following:

@echo off

echo user MyUserName> ftpcmd.dat

echo MyPassword>> ftpcmd.dat

echo bin>> ftpcmd.dat

echo put %1>> ftpcmd.dat

echo quit>> ftpcmd.dat

ftp -n -s:ftpcmd.dat SERVERNAME.COM

del ftpcmd.dat

Note: You will have to replace the above “MyUserName”/ MyPassword/ SERVERNAME.COMwith your correct the values of your FTP servers.

This batch file will script the FTP utility using the command line utility. As this batch file uses the echo command to send the message to the FTP server.

You can change the directory command by using this echo command:

echo cd /pathname/>>ftpcmd.dat

Now you will have to call the batch file to do it you will use the fileup.bat given at the beginning part of the article but you will actually not need to type your .bat part of the filename to make it work.

Example of it is:

> fileup UploadingFile.zip

Connected to ftp.yourserver.com
220 Microsoft FTP Service
ftp> myusername
331 Password required for myusername.

230 User myusername logged in.
ftp> bin
200 Type 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

Well that is all you will need to do to automate FTP upload your files from one Server to another so now you know how to automate FTP upload from the Windows Command line

Mohan

I'm Mohan From Hyderabad was born on 05-May-1998 . I'm a Young Blogger and an Entrepreneur. Blogging Since 2015. Away from Blogosphere, I love listening music and hangouts with friends.

Recent Posts

Should you convert from prepaid to postpaid? What are the benefits?

In an age where staying connected is paramount, choosing the right mobile plan can be…

1 year ago

Do You Need a Disposable Mobile Number for Verification?

Disposable phone numbers are here to stay and there are many reasons why. Stay with…

2 years ago

The Benefits of IT Consultation Services

The benefits of IT Consultation Services are numerous. Not only do they help businesses find…

2 years ago

The Perfect Mobile Plan for Your Situation

Thankfully, roaming charges are a thing of the past when you go to France for…

2 years ago

What Is an IP Phone System? Does My Business Need One?

All business owners are doing their best so their business continues to grow. With proper…

2 years ago

Getting A Lån: 4 Tips For Choosing A Lender

Have you been thinking a lot about finding a way to gather the money that…

3 years ago