Ask the Expert

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.

Requires Free Membership to View

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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: