scythetleppo Posted June 15, 2006 Share Posted June 15, 2006 I have this: $test = "c:\temp.bat" FileOpen ( $test, 2 ) FileWrite ( $test, "@echo off" ) FileWrite ( $test, @crlf ) FileWrite ( $test, echo hello ) FileWrite ( $test, @crlf ) FileWrite ( $test, "testing.exe > C:\testing.txt" ) FileClose ( $test ) Run ( "C:\temp.bat" ) When it gets to running, it says the file is being used.. Link to comment Share on other sites More sharing options...
nfwu Posted June 15, 2006 Share Posted June 15, 2006 (edited) If you search around, you'll notice that this has been discussed before. At a second glance, I notice that you did not use a file handle: $testfile = "c:\temp.bat" $test = FileOpen ( $testfile, 2 ) FileWrite ( $test, "@echo off" ) FileWrite ( $test, @crlf ) FileWrite ( $test, "echo hello" ) FileWrite ( $test, @crlf ) FileWrite ( $test, "testing.exe > C:\testing.txt" ) FileClose ( $test ) Run ( "C:\temp.bat" ) #) edit: also noticed that your FileWrite ( $test, echo hello ) line was wrong Edited June 15, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
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