Jump to content
Sign in to follow this  
Pauletp

command line puzzle

Recommended Posts

Pauletp

I want to use AutoIt3 to run a command line program.

The program is called "c:\midi2abc.exe"

Example: In Windows when I enter

"c:\midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc"

at the command line the output is a text file called "c:\test.abc"

which has the content I expect.

------

I tried the following line with AutoIt

Run(@ComSpec & " /c midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc", "", @SW_HIDE)

The script executes but the result is an empty file .

Have I messed up the syntax somehow?

Thanks anyone for a tip.

Share this post


Link to post
Share on other sites
Pauletp

you don't have the path infront of the program anymore so are you sure the workdir is c:\ ?

----

Thanks for the tip.

Wasn't sure about the working directory but I inserted "C:\" as follows

Run(@ComSpec & " /c midi2abc -k 2 test.mid > test.abc -k 2 c:\test.mid > c:\test.abc", "C:\", @SW_HIDE)

... and it works ...!

Share this post


Link to post
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
Sign in to follow this  

×