UDC from shell context menu
Posted: 26 Oct 2008 17:49
I am interesting if it is possible to make a UDC out of any command that's available from shell context menu.
Example:
I have a series of sequentially numbered parts of an archive that, when extracted, creates one big file. If WinRAR is integrated into shell, it provides 3 commands when right-clicking on an archive:
1. "Extract files..."
2. "Extract Here"
3. "Extract to folder" where folder = <curitem> (without the part number and rar extension)
So, if you have a list of files like this:
temp.part1.rar
temp.part2.rar
temp.part3.rar
...and so on
then selecting option 3 when right-clicking will extract the contents of those parts to a folder called "temp". I'd like to create a UDC that will achieve exactly that.
Doing so:
isn't effective because there is no guarantee that the full path (aka folder) is present in RARs.
On the other hand, doing this:
is no good either because that will grab the full name of the file instead of only the relevant part. In other words, there is no way to exclude a set number of chars from <curitem>.
A solution could be to automatically add shell-integrated commands to list of functions or to enable us to be able to remove a set number of chars from beginning/end of custom variables.
Example:
I have a series of sequentially numbered parts of an archive that, when extracted, creates one big file. If WinRAR is integrated into shell, it provides 3 commands when right-clicking on an archive:
1. "Extract files..."
2. "Extract Here"
3. "Extract to folder" where folder = <curitem> (without the part number and rar extension)
So, if you have a list of files like this:
temp.part1.rar
temp.part2.rar
temp.part3.rar
...and so on
then selecting option 3 when right-clicking will extract the contents of those parts to a folder called "temp". I'd like to create a UDC that will achieve exactly that.
Doing so:
Code: Select all
Set($cf,<curfolder>);
OpenWith("""C:\program files\winrar\winrar.exe"" x -- *.rar * $cf", "s");On the other hand, doing this:
Code: Select all
Set($ci,<curitem>);
OpenWith("""C:\program files\winrar\winrar.exe"" e -- *.rar * $ci", "s");A solution could be to automatically add shell-integrated commands to list of functions or to enable us to be able to remove a set number of chars from beginning/end of custom variables.