Sign in to follow this  
Followers 0
milanlacn

Run commands and quotation marks problem

5 posts in this topic

I'm pretty confused, when I run this in command line:

"c:\Program Files\MKVtoolnix\mkvmerge.exe" -i "d:\1.mkv" > "d:\test.txt"

everithing works great, but the exactly same thing using Run:

Run(@ComSpec & ' /c "c:\Program Files\MKVtoolnix\mkvmerge.exe" -i "d:\1.mkv" > "d:\test.txt"')

doesn't do anything. Find out that

Run(@ComSpec & ' /c mkvmerge -i "d:\1.mkv" > "d:\test.txt"')

works just fine (I have ""c:\Program Files\MKVtoolnix\" on my path)

Can comeone please explain to me what I'm doing wrong? I'm guessing the problem is in the quotation marks?

Big thanks!

Share this post


Link to post
Share on other sites



Works like a charm! Thanks a lot Zedna!!!

I don't really understand why is necessary set workingDir like that. :mellow: But I'm glad it works!

Thanks again!

Share this post


Link to post
Share on other sites

I don't really understand why is necessary set workingDir like that. :mellow: But I'm glad it works!

command /c expect only COM/EXE/BAT file name without path so you must specify its path in Run's second parameter "working directory".

Share this post


Link to post
Share on other sites

Thanks for the explanaition!! Really appreciate it! :mellow:

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  
Followers 0