I have a command line application I use fore extracting files. Currently I'm using a batch file, but I have to drag-and-drop each file onto the batch file, so I want to add a context menu item for ease of use.
My batch file looks like this:
extract "%~1" -o "%~dpn1"
extract extracts and archive or and sfx archive (exe)
-o sets the output directory.
This is what my registry looks like:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\exefile\shell\extract] "MUIVerb"="Extract to SubDir" [HKEY_CLASSES_ROOT\exefile\shell\innoex\command] @="D:\\Programs\\extractor\\extract.exe \"%~1\" -o \"%~dpn1\""
~ signs are, apparently, not recognized here, so I removed them and it worked, except not the way I wanted it to.
Foo.exe gets extracted to a directory called
So I changed the command to:
extract "%1" -o "%d"
This, however doesn't work at all.
So, instead of trying out to see what works from the registry, I need the correct syntax that will work. I've been browsing MSDN for a while now, but I can't find the answer.
%1 presumes first command passed. Can I pass more than 1? i.e. can I select multiple files and extract them one AFTER the other? Currently, I see multiple command line windows, all extracting at the same time.