AntiVirusGuy 1 Posted May 20, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fine RunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt") Share this post Link to post Share on other sites
herewasplato 2 Posted May 20, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>...very strange indeed...Did you copy/paste exactly the code that you are running? If so, then would be overwriting the first text file - were it working for you.My next suggestion might not make much sense, but when one is grasping at straws......try running the first of the three lines above in a script by itself... [size="1"][font="Arial"].[u].[/u][/font][/size] Share this post Link to post Share on other sites
AntiVirusGuy 1 Posted May 22, 2005 It is cut and pasted exactly and when I paste it in a command prompt it works perfect...very strange indeed...Did you copy/paste exactly the code that you are running? If so, then would be overwriting the first text file - were it working for you.My next suggestion might not make much sense, but when one is grasping at straws......try running the first of the three lines above in a script by itself...<{POST_SNAPBACK}> Share this post Link to post Share on other sites
GaryFrost 18 Posted May 22, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>TryRunWait (@ComSpec & " /C C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
MrSmiley 0 Posted May 22, 2005 I have these three lines in my script just to show the process has run. Only the 3rd (irtools.txt) gets created no matter what I do the other two will not create the files even though I can run the command in a dos box and it creates the tex files fineRunWait ("C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt")RunWait ("C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}>My guess is the second write to the file xpfix.txt is happening too fast, causing the second write to fail, effectively deleting the file. Change the filename of the second file to 2kfix.txt instead, so there's no attempt to write to the same file twice in a row, and see if you still have missing files. Share this post Link to post Share on other sites
GaryFrost 18 Posted May 22, 2005 also on the 1st 2 are writing to same file, "creating" might want to change > to >> SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
PerryRaptor 1 Posted May 22, 2005 I've run into this before...GaFrost is right about the double >> to append new text to a file. Also, you can write too fast...put some Sleep() inbetween those three lines or use FileOpen() and FileReadLine() to open three seperate logfiles and join them into one. On my Athlon 64 3800, MS-DOS commands execute under 1/10 of a second. Share this post Link to post Share on other sites
AntiVirusGuy 1 Posted May 23, 2005 thanks guys I thank you much I will try it in the amTryRunWait (@ComSpec & " /C C:\cscirtemp\0506a\xpfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\2kfix.exe >C:\cscirtemp\0506a\logs\xpfix.txt") RunWait (@ComSpec & " /C C:\cscirtemp\0506a\irtools.exe >C:\cscirtemp\0506a\logs\irtools.txt")<{POST_SNAPBACK}> Share this post Link to post Share on other sites