I am trying to convert the following .bat file into a .vbs file but I am unsure of the easiest way:
Now I know how to use the WScript.Shell with the Run method but how do I specify all 4 of the above lines of code in a single command?
This just seems like way too many lines of code to do what I need. Any help would be awesome.
Code:
D:
cd .\RightFax\AdmUtils
faxdump -fserver.domain.com -uDEFAULT -s10/01/05 -e10/31/05 -oC:\Temp\Fax.txt -l1 -h
Code:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "D:"
WScript.SendKeys "{ENTER}"
WshShell.Run "cd .\RightFax\AdmUtils"
WScript.SendKeys "{ENTER}"
WshShell.Run "faxdump -fserver.domain.com -uDEFAULT -s10/01/05 -e10/31/05 -oC:\Temp\Fax.txt -l1 -h"
WScript.SendKeys "{ENTER}"