Redirect exe file output to text file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajavemu
    New Member
    • Dec 2012
    • 11

    Redirect exe file output to text file

    Hi,

    I am just trying to execute the below command in command prompt and it works perfect

    Code:
    """C:\Program Files\ccc""" -C server -t 13 -l -R -s 03/04/2013 /D/ > E:\m_bkup\mk.txt
    but when i try to execute the script i am getting compilation error that expected end of statement.

    Code:
    Option explicit
    Dim WshShell,objExec
    
    Set WshShell = CreateObject("Wscript.Shell")
    
    WshShell.Exec """C:\Program Files\ccc""" -C server -t 13 -l -R -s 03/04/2013 /D/ > E:\m_bkup\mk.txt
    I have tried with both Wshshell.run and wshshell.exec, but no luck, please help me resolving the issue
Working...