Jump to content

command line puzzle


Pauletp
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 ...!

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...