Jump to content

@Comspec


grakker
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...