I want to make a batch file from a VBscript. There are some things that are just easier for me to do in dos (I don't want to spend a week learning to do em in vbs).
In dos i go
echo wscript.echo "this is sweet" >> c:\temp\temp.vbs
I have tried
dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject"
Set filetxt = filesys.CreateTextFile("c:\zzz.txt", True)
path = filesys.GetAbsolutePathName("c:\zzz.txt"
getname = filesys.GetFileName(path)
filetxt.WriteLine("REM QD Audit by Bruce Taylor"
and that works fine but thing like
filetxt.WriteLine("for /f "tokens=3" %%I in ('ping %ipaddr% ^|find "Reply from"') do set replied=%%I"
don't work because it hits a " in the text and looks for the variable (I guess). I want to be able to create a .bat file with literal lines echoed into it no matter what the syntax (which I imagine is simple to a true vbs'r).
Can you clue me in please??
Thanx
In dos i go
echo wscript.echo "this is sweet" >> c:\temp\temp.vbs
I have tried
dim filesys, filetxt, getname, path
Set filesys = CreateObject("Scripting.FileSystemObject"
Set filetxt = filesys.CreateTextFile("c:\zzz.txt", True)
path = filesys.GetAbsolutePathName("c:\zzz.txt"
getname = filesys.GetFileName(path)
filetxt.WriteLine("REM QD Audit by Bruce Taylor"
and that works fine but thing like
filetxt.WriteLine("for /f "tokens=3" %%I in ('ping %ipaddr% ^|find "Reply from"') do set replied=%%I"
don't work because it hits a " in the text and looks for the variable (I guess). I want to be able to create a .bat file with literal lines echoed into it no matter what the syntax (which I imagine is simple to a true vbs'r).
Can you clue me in please??
Thanx