Discussion Locked

FTP Subdirectories with Contents

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a directory with a few files in it along with subdirectories with more files. I want to FTP the whole works using a batch file (windows command line FTP). Is it possible to do this without making multiple CD and MPUT commands?

6 replies

by jennl

Thanks for the suggestion, but I don't want to use an ftp software - just a simple batch file in a scheduler.

by dklippert

From various place on the net:

"The commands mget and mput allow for multiple file transfers using wildcards to get several files, or a whole set of files at once, rather than having to do it manually one by one. For example, to get all files that begin with the letter f, one would type

ftp> mget f*

Used the same way as get, this command can use metacharacters, but will prompt the user before every file transfer unless the -i flag was used with the ftp command, or the prompt commandis issued.
Normally, FTP assumes a user wants to be prompted for every file in a mget or mput operation. You'll often need to get a whole set of files and not have each of them confirmed--you know they're all right. In that case, use the prompt command to turn the queries off.

ftp> prompt
Interactive mode off.
Likewise, to turn it back on, the prompt command should simply be issued again."

by jennl

Thanks for the interactive mode off, I will add that to the batch file (was already using mput & wildcards). My problem was how to get at the subdirectories too, since the "/s" switch won't work. I believe we separated the batch files on thisone since it isn't an open issue anymore.

This discussion is closed to new replies.