How to FTP using Windows Command Prompt
Go to the Start Menu and Click Run…
In the Run dialog box, type cmd and click OK
The Windows Command Prompt will open. Type the following command to connect to your server:
Where yourdomain.com is your domain or the FTP Server IP Address found in the HELM Control Panel under the FTP Account Details.
Once you hit Enter it will attempt to connect to the server. If it is successful, you will be prompted for a Username and Password. Enter the FTP username and password information to login.
Once you have Logged in, you should see a line like ftp>
To list the Directory Contents, use the command dir
You have successfully connected to your server through FTP using Windows Command Prompt.
More FTP Commands:
ABOR – abort a file transfer
CWD – change working directory
DELE – delete a remote file
LIST – list remote files
MDTM – return the modification time of a file
MKD – make a remote directory
NLST – name list of remote directory
PASS – send password
PASV – enter passive mode
PORT – open a data port
PWD – print working directory
QUIT – terminate the connection
RETR – retrieve a remote file
RMD – remove a remote directory
RNFR – rename from
RNTO – rename to
SITE – site-specific commands
SIZE – return the size of a file
STOR – store a file on the remote host
TYPE – set transfer type
USER – send username
Automating File Uploads
Create a commands file (in my example it is named commands.txt).
Type the following in your commands.txt:
Any commands starting with “!” will be executed on the local server rather than the remote server. Remove the line marked in Red if you would like to keep the files on the source server after the upload has been finished.
To execute these commands type in the windows command prompt:
This command will execute the script.
If you would like to automate the file upload, create a MS-DOS batch file with notepad ( extension needs to be .cmd or .bat) and save the above FTP command. You can now use this file to create scheduled tasks and run it at specific intervals.
To find out how to use VBScript instead, check out yesterday’s article on FTP File Uploads.