Jump to content

"Right Click ----> List Contents" tweak


Recommended Posts

I created a registry tweak similar to the very popular CMD HERE tweak.

This tweak gives me the option to make a list of all the files inside the folder/drive when I right-click on it. It is very usefull for people like me who wants to make a printable list of their huge collections (mp3's for example).

Here is the tweak. (EDIT: PROBLEMS SOLVED)

Save this as a batch file.

REG ADD "HKCR\Folder\shell\List Contents\command" /ve /d "%COMSPEC% /C DIR ""%%1\"" /B /O /S>""%%1\""\"_CONTENTS LIST.TXT""

131_1.jpg

When I right-click a folder and select "List Contents", a text file named "[FOLDERNAME]_CONTENTS LIST.TXT" will be created OUTSIDE that directory containing the list of all the files.

NOTE: It doesn't work on CDs.. :no:

I have some questions.

1.  How can I replace the C:\Windows to %SYSTEMROOT%?  I tried it but it didn't work.  I also tried replacing C:\Windows\System32\cmd.exe to %COMSPEC% but it didn't work too.

2.  I want to replace the name of the outputfile "CONTENTS LIST.TXT" to [FOLDERNAME].txt.  How can I do that?

:)

ALL PROBLEMS SOLVED!!! :thumbup Well, not really.. Because it doesn't work on CDs..

Thanks to prathapml for giving me the idea of using a batch file instead of a reg file. :)

Link to comment
Share on other sites


A much needed tweak here as well unfortunately I'm getting this error "This file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel."

Sorry, I miss typed the code. :P Please try the edited code again. :lol:

Link to comment
Share on other sites

Excellent it works now. I've been using a tiny app called Destiny for this purpose for years now...maybe I'm ready for a change.

Would love to help you with the additional feature you (and I) are after but have no idea what needs to be changed/added.

Link to comment
Share on other sites

Your second Q is a good one, to which we don't know a good answer yet. Probably some code to get %CD% then strip only characters from the last slash? I don't know...

As for using %systemroot%

For example, to convert
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Opera.exe]
@="C:\\Program Files\\Opera7\\Opera.exe"
"Path"="C:\\Program Files\\Opera7"

to system variable strings, execute these commands from a batch file (its just like what you do for the RunOnceEX method):

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Opera.exe" /VE /D "%ProgramFiles%\Opera7\Opera.exe" /f

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Opera.exe" /V Path /D "%ProgramFiles%\Opera7" /f

If more explanation of that is needed, just let me know. :)
Link to comment
Share on other sites

I don't want to hijack this thread in any way so just ignore me if you feel I'm doing so. I'm just curious which other (I'm only using CMD here & MakeISO) similar tweaks to this one you are using. I've seen quite a few that add things to My Computer but I very much prefer these.

Link to comment
Share on other sites

Excellent it works now. I've been using a tiny app called Destiny for this purpose for years now...maybe I'm ready for a change.
I'm glad to see it's working for you now. Again, I'm sorry for the typo error earlier. :lol:
Would love to help you with the additional feature you (and I) are after but have no idea what needs to be changed/added.

That would be great. Thanks. :)

EDIT: THE CODE IS EDITED AGAIN BECAUSE I FOUND ANOTHER TYPO ERROR. :P

Link to comment
Share on other sites

This my Version of that, I create the list in the dir without using %temp,

open in Notepad

and I'm using REG_EXPAND_SZ which allows %SystemRoot%

Windows Registry Editor Version 5.00
;%SystemRoot%\system32\cmd.exe /c dir /B /O /S > %1\dirlist.txt|%SystemRoot%\system32\notepad.exe %1\dirlist.txt

[HKEY_CLASSES_ROOT\Directory\shell\Dir List\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
 64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,63,00,20,00,64,00,69,00,72,00,20,\
 00,2f,00,42,00,20,00,2f,00,4f,00,20,00,2f,00,53,00,20,00,3e,00,20,00,25,00,\
 31,00,5c,00,64,00,69,00,72,00,6c,00,69,00,73,00,74,00,2e,00,74,00,78,00,74,\
 00,7c,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
 25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,\
 00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,25,00,31,00,\
 5c,00,64,00,69,00,72,00,6c,00,69,00,73,00,74,00,2e,00,74,00,78,00,74,00,00,\
 00

I tried for awhile to make it with REG ADD but I gave up.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...