Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Help needed executing command prompt command


04 Jan 2013   #1

Windows 7 Ultimate 32bit
 
 
Help needed executing command prompt command

So this isn't Windows 7 specific, but I'm not sure where else to ask this... anyway, so I'm working with the mkvmerge utility (MKVToolNix utility which allows video conversion/editing) in the command prompt. What I hope to do is create a batch file which will run through and insert every filename in the current directory into the command.

Here is the basic outline of the command-line format:
mkvmerge [global options] {-o out} [options1] {file1} [[options2] {file2}] [@optionsfile]

Example (as generated by the GUI)
C:\Path To Files> "C:\Program Files (x86)\MKVToolNix\mkvmerge.exe" -o "C:\\Path To Files\\outputFile.mkv" "--aspect-ratio" "0:1.7" "--compression" "0:none" "(" "C:\\Path To Files\\inputFile.avi" ")"

Here's where I'm stuck at now:
C:\Path To Files> FOR /F "delims==" %i IN ('dir /B /S') DO "C:\Program Files (x86)\MKVToolNix\mkvmerge.exe" -o %~dnpi "--aspect-ratio" "0:1.7" "--compression" "0:none" "(" %~fi ")"
C:\Path To Files> mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01
Error: The source file 'C:\Path' could not be opened successfully, or retrieving its size by seeking to the end did not work.
C:\Path To Files> mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01
Error: The source file 'C:\Path' could not be opened successfully, or retrieving its size by seeking to the end did not work.
C:\Path To Files> mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01
Error: The source file 'C:\Path' could not be opened successfully, or retrieving its size by seeking to the end did not work.
C:\Path To Files> mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01
Error: The source file 'C:\Path' could not be opened successfully, or retrieving its size by seeking to the end did not work.

Any help or suggestions would be much appreciated!


Here are some helpful links:
FOR command - Link 1
FOR command - Link 2
mkvmerge - Global Options

My System SpecsSystem Spec
.

Reply

 Help needed executing command prompt command




Thread Tools



Similar help and support threads for2: Help needed executing command prompt command
Thread Forum
Command Prompt Tutorials
How to fix MBR through command prompt? General Discussion
SSH command prompt Performance & Maintenance
command prompt General Discussion
Run administrative command prompt from command prompt General Discussion
Solved Command Prompt General Discussion
Command Prompt command <ipconfig> not working Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:29 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33