So I'm trying to do something like this:
ftp my.ip.add.ress(user id)(password)cd /the/directorysend C:/code/project1/*byeI know you can send Windowsftp commands through the command line when you first start it like-send, but the question is can I use a .bat script to act interactively with the program it starts? By default what happens is the first line:
ftp my.ipStarts ftp, but the subsequent lines never run untilftp exits.
edit
Another way to phrase this question is "Is it possible to use a .bat file to queue lines of text to feed tostdin whenstdin is next checked for input?"
1 Answer1
As far as I know, the command shell is not multi-threaded, so there is no way for a batch to continue executing while another interactive shell program is executing within it.
You need to move the FTP commands into their own file, and pass that to the FTP program so it can run them as its own internal script.
ftp -s:filenameSpecifies a text file containing FTP commands; the commands will run automatically after FTP starts.
2 Comments
ftp, however I'm curious about whether or not its possible to "queue" things in stdin as it were from a .bat file -Explore related questions
See similar questions with these tags.
