• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
totoymola

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

67 posts in this topic

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. :)

0

Share this post


Link to post
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."

0

Share this post


Link to post
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:

0

Share this post


Link to post
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.

0

Share this post


Link to post
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. :)
0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

Thanks prathapml for the brilliant suggestion. I totally forgot about using a batch file! I will convert the regfile to batch. :thumbup

0

Share this post


Link to post
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

0

Share this post


Link to post
Share on other sites

Updated again.

1. All problems solved! :thumbup Including the name of the output file.

2. Converted to batch.

0

Share this post


Link to post
Share on other sites

really useful!, i use something similar indeed: sendto>dirtxt.cmd

@ECHO OFF
IF EXIST "%~f1\DIR.TXT" DEL /F /Q "%~f1\DIR.TXT"
DIR %1 /A /-P /O:GN>"%TEMP%\DIR.TXT"
MOVE "%TEMP%\DIR.TXT" "%~f1\DIR.TXT"

0

Share this post


Link to post
Share on other sites

Nice idea!

I also find it strange that I can't use %SystemDrive% or %ComSpec% directly in the registry. Ofcourse, prathapml's has a solution, but I want to know wether it's possibly to install this tweak with a REG-file.

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

@maxXPsoft:

:D you gave up the REG ADD thing and i gave up with the reg-file (for using %SystemDrive% in general)!

This file of your works great! Thanks!

0

Share this post


Link to post
Share on other sites

This is my version, it is similar to maxXPsofts, the main difference being that it is not text editor dependent.

This file once created, will open up in the program with which your .txt filetype is associated.

The following is a .reg version:

Code removed.... see <Edit> below for details

Also below is an inf version, which has the added benefit of being uninstalled.

<Edit>

Code and attachment removed due to later improvements, for reg version please go to this message. For updated inf version please see this message.

</Edit>

0

Share this post


Link to post
Share on other sites

Nice SiMoNsAyS, maxXPsoft and Yzöwl! We have a lot of options now. :thumbup

Question, how can you change the file name of the text file from "dirlist.txt" to [DIRECTORYNAME].txt? Especially maxXPsoft and Yzöwl, because I don't understand hex values. :lol:

0

Share this post


Link to post
Share on other sites

@totoymola

You can easily edit it yourself. Import the tweak in the registry, change the value with regedit and then export it again.

0

Share this post


Link to post
Share on other sites
REG ADD "HKCR\Folder\shell\List Contents\command" /ve /d "%COMSPEC% /C DIR ""%%1\"" /B /O /S>""%%1\""\"_CONTENTS LIST.TXT""

nice script, but it does not work correctly the way you posted it

replace '%%1' by '%1'

(tested on xpsp2)

0

Share this post


Link to post
Share on other sites

is there any difference between HKCU\Folder and HKCU\Directory?

0

Share this post


Link to post
Share on other sites

Yes, Folder is for each folder you can imagine. These includes, directories, drives, recycle bin, my computer etcereta.

Directory, is just.. directories. :P

So you should always use this Folder, because otherwise you'd have to make a seperate one for Drive. Also My Documents isn't included with Directory.

0

Share this post


Link to post
Share on other sites
nice script, but it does not work correctly the way you posted it

replace '%%1' by '%1'

(tested on xpsp2)

Hello swgreed. I tried that, but it didn't work correctly. We need to have this in the HKEY_CLASSES_ROOT\Folder\shell\List Contents\command

C:\WINDOWS\system32\cmd.exe /C DIR "%1" /B /O /S>"%1""_CONTENTS LIST.TXT"

If I just use %1, I will not get that entry, because it will just be ignored. :)

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

Afterdawn is right. If we use "Directory", we still need to have the same entry in the "Drive". :)

0

Share this post


Link to post
Share on other sites

my fault..

i executed the "reg add..." directly instead of putting it into a batch-file!

:blushing:

0

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

  • Recently Browsing   0 members

    No registered users viewing this page.