Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading this site:

But it's confusing and I'm not sure how to structure the command.

Basically I have a few text files I need to COPY from SERVER1 (internal server) to an FTP server (outside the company). Let's call the ftp location ""

Let's just use one file for this, called test.txt

The username and password for the FTP is u: bob p: bob123

How would I construct a copy command to this FTP that uses a username/password?

Source file location: C:\test.txt

Destination location:

Username: bob

Password: bob123

This is part of an automated process so there's no human intervention.

ftp ...

Thanks for the help.

share|improve this question

migrated from Dec 11 '12 at 1:18

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

You can add the commands below to a script to get the functionality that you want. If you plan on scripting this I would recommend using variables for destination, filenames etc.

ftp <destination location> user <username> <password>
put <local filename> <filename on destination server>

If you need to copy multiple files you can use mput -i as long as you can represent all the local files that need to be copied using an expression, for example, '*.c', to copy all c files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.