Automatically connect to FTP and upload files

I want to write a simple DOS program (.bat) to connect to FTP and automatically upload files. Can I connect to FTP using a batch program and, if so, how do I do it? Also, I want to pass the name of the file while running the batch program.
As you didn't indicate which operating system you are using, I'll assume you're using an NT-based system (Windows NT4/2000/XP/.NET). The FTP.EXE command line program will do everything you want. In fact, the -s option allows you to pass in a text file of commands to execute, so you don't even have to go to the trouble of writing a batch file.

This was first published in May 2002

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.