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 want to send a file to a ftp server using the command line of Windows. How do I do this?

share|improve this question

migrated from stackoverflow.com Dec 28 '10 at 21:40

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

    
What, in the first place, is your OS? – Bassie Dec 28 '10 at 21:34
    
I dont understand why this is being down voted? – biz Dec 28 '10 at 21:34
    
Which OS are you using? – Klaus Byskov Pedersen Dec 28 '10 at 21:34
    
My OS is windows 7 – biz Dec 28 '10 at 21:35
1  
@biz it could be downvoted because the question is incomplete, or because it's to broad or not a real question. – Bassie Dec 28 '10 at 21:35
ftp ftp.someftp.com
cd /pub/somewhere
binary # if you are uploading non-TXT files
passive on
put filetobeuploaded.zip

Something along those lines should be enough. passive on is needed on some servers. You might not need it.

share|improve this answer
    
put filetobeuploaded.zip into ftp ftp.someftp.com – biz Dec 28 '10 at 21:35
    
Don't forget binary. IIRC ftp uses ASCII mode by default, and that could really mess up things like zip files. – cHao Dec 28 '10 at 21:37
    
You are right :) Hear that @biz? :) – ismail Dec 28 '10 at 21:38

if it is static, put the commands in a txt file like commands.txt, then call

ftp -s:commands.txt

Keeps it nice and clear, and you can just modify the txt file when needed.

share|improve this answer

Your Answer

 
discard

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