VBscript and CMD writing into a text file

Posted by Effected on Stack Overflow See other posts from Stack Overflow or by Effected
Published on 2012-03-25T17:25:28Z Indexed on 2012/03/25 17:29 UTC
Read the original article Hit count: 159

Filed under:
|
|
|

I am writing a script that executes and write everything to the file

here is example,

I stored the complete command in the variable 'Command' ,

Command = "ftp ftp.xyz.com 21 " & vbCRLF

and then executing it in command prompt,

shell.Run "%comspec% /c FTP " & Command & " > " & E:/abc.txt, 0, TRUE

but when this program execute it won't write anything to the text file because this is an incomplete command, this command on execution prompt user to input username and password of FTP,

how can i do this , that my programm automatically input username and password when prompt and then write everything to file ?

© Stack Overflow or respective owner

Related posts about shell

Related posts about text