asp.net - Interact with executable invoked from batch file -
i have executable file opens command prompt , connects ftp. use download , upload files manually typing get , put commands command window. ultimate goal automate ftp process using either asp.net console app or batch file, either 1 work. i've tried calling executable in batch file followed ftp commands waits executable exit before runs next command in batch file.
"c:\myftp.exe" ‘ftpfile.txt’ c:\temp\myfile.txt timeout /t 5
just illustrate, if open batch file above, want execute get command inside of myftp.exe executable. instead waits me type quit before executing other commands. have suggestions?
this vbscript requesting. can activate via batch file "c:\windows\system32\cscript.exe c:\my\file\location.vbs" or directly if on 32 bit system. view vbscript info section more details.
set objshell = wscript.createobject("wscript.shell") objshell.run("""c:\my folder loc\myftp.exe""")'keep double quotes specific path names until success = true success = objshell.appactivate("untitle - ftp") ' put application title text here (e.g. untitle - notepad) wscript.sleep 1000 loop enter code here objshell.sendkeys "get 'ftpfile.txt' c:\temp\myfile.txt" objshell.sendkeys "~" 'enter objshell.sendkeys "timeout /t 5" objshell.sendkeys "~" 'enter
Comments
Post a Comment