grakker Posted December 27, 2004 Share Posted December 27, 2004 I'm really having a hard time with this. From a dos window I can run:C:\Whatever\Directory>sed 's/","/ /' c:\StartingFile > c:\EndingFile Which works great. Runs about 2 seconds on a 90,000 line file. It should be simple to run from Autoit. Yet this:RunWait(@ComSpec & ' /c ' & @SystemDir & "\sed 's/"",""/ /' c:\StartingFile > c:\EndingFile", @SW_HIDE) Gives the following error: C:\AutoItFiles\CleanCustomerBridge.au3 (29) : ==> Unable to execute the external program.: RunWait(@ComSpec & ' /c ' & @SystemDir & "\sed 's/"",""/ /' c:\StartingFile > c:\EndingFile", @SW_HIDE) The directory name is invalid. I've tried it w/o the @SystemDir and as many different variables as I could try. Thanks in advance. Link to comment Share on other sites More sharing options...
Josbe Posted December 27, 2004 Share Posted December 27, 2004 The directory name is invalid.What about SED file? System's file?Check the quotes, too. (correctly closed?) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
SlimShady Posted December 27, 2004 Share Posted December 27, 2004 This is tested with the ECHO command: RunWait(@ComSpec & ' /c sed ''s/","/ /'' c:\StartingFile > c:\EndingFile', @SystemDir, @SW_HIDE) Link to comment Share on other sites More sharing options...
normeus Posted December 28, 2004 Share Posted December 28, 2004 this is how I run my AWK stuff in win 98: $val = RunWait("C:\GAWK\BIN\gawk.exe -fd:\prg\printcnt.awk d:\user\cnt\*.cnt") (AWK is SED's older brother) http://www.autoitscript.com/autoit3/scite/...iTe4AutoIt3.exe Link to comment Share on other sites More sharing options...
grakker Posted December 28, 2004 Author Share Posted December 28, 2004 this is how I run my AWK stuff in win 98:$val = RunWait("C:\GAWK\BIN\gawk.exe -fd:\prg\printcnt.awk d:\user\cnt\*.cnt")(AWK is SED's older brother)<{POST_SNAPBACK}>Coming from *nix, I'm pretty versed in most common CLI apps. My problem was that I wasn't reading the help file correctly. I just needed to add and extra parameter to the RunWait command in order to use the @SW_HIDE option.Thanks everyone. 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