sambuddy Posted December 11, 2006 Posted December 11, 2006 Hello All, I have a script where I am running a command and sending the STDOUT to a text file. I do this about six times in my script, but this line has decided to stop producing the STDOUT txt file. The confusing thing is that it does execute the command correctly and if i run the command at a dos prompt, it will also produce the STDOUT txt file The first line is the one causing the problem. The last lien is where I am looking for the STDOUT file. Any suggestions as to what may be wrong? Thanks $PID=RunWait(@ComSpec & " /C pes2tp.exe input=AV.vps output=AV.vtp pid=0x240 -r " & $new_bitrate & " > pes2tp_video_out.txt", $current_directory, @SW_HIDE) ProcessWaitClose($PID) GUICtrlSetData($txt1,GuiCtrlRead($txt1) & "***************************pes2tp for video finished********************************" & @CRLF) ;check if stdout file was produced $0=FileExists("pes2tp_video_out.txt")
Valik Posted December 11, 2006 Posted December 11, 2006 You specify a working directory to Run(). That is the directory where the output file will be. Later you check in AutoIt's working directory for the file. Very likely $current_directory is not the same as @WorkingDir so you're simply looking for the file in the wrong place. You should always specify the full path to a file to avoid problems like this.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now