|
Answer» ok..i have a problem with a .batch file im running.... lets say i open "a.bat" the code i have so far is:Code: [Select]echo ( start iexplore.exe www.google.com exit ) >"a1.bat start a1.batnow i know this is wrong...i also tried Code: [Select]echo start iexplore.exe www.google.com|exit>"a1.bat start a1.bat ..now before u start saying "just do 'start www.google.com'", i NEED to open google through this format, and be able to for future reference, and not just OPENING google... thx all!In the TV VERSION of M*A*S*H, Major Charles Emerson Winchester said he did one thing at a time, did it very well and then moved on.
Words to live by. Don't try to do everything at once:
Code: [Select]echo start iexplore.exe www.google.com > a1.bat echo exit >> a1.bat
Once a1.bat is created, you can launch the program with start a1.bat
thanks SIDEWINDER ! that really helped, and now it doesnt break ANYMORE I've come across another problem with this...Code: [Select]... echo echo Hello World >> a1.bat echo pause>nul >> a1.bat ...APPEARS to work fine, but when I call or start a1.bat it is just "pause" instead of "pause>nul". Is there anyway to get it to say "pause>nul" through the format above? And if not, is there anyway I can do this that is automated? Thx!Try using the escape character (^):
Code: [Select]echo pause ^> nul >> a1.bat
|