Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

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

- - - - -

  • Please log in to reply
66 replies to this topic

#1
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04
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""

Posted Image

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. :)
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD


How to remove advertisement from MSFN

#2
CypherBit

CypherBit

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 04-June 04
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."

#3
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04

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:
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#4
CypherBit

CypherBit

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 04-June 04
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.

#5
prathapml

prathapml

    Follow the rules please :-)

  • Patrons
  • 6,791 posts
  • Joined 14-November 03
  • OS:Windows 8 x64
  • Country: Country Flag
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. :)
Posted ImageCheers !!!   Donate to MSFN and Help Keep This Site Running
||Please Read the Forum Rules||  Etiquette   || Welcome to MSFN - Forum Basics || Before posting
prathapml :: MSFN Supermod :: Private Message me if you ever have a problem while at MSFN

#6
CypherBit

CypherBit

    Junior

  • Member
  • Pip
  • 70 posts
  • Joined 04-June 04
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.

#7
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04
Thanks prathapml for the brilliant suggestion. I totally forgot about using a batch file! I will convert the regfile to batch. :thumbup
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#8
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04

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
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#9
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04
Updated again.

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

2. Converted to batch.
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#10
lilweirddude

lilweirddude

    Senior Member

  • Member
  • PipPipPipPip
  • 573 posts
  • Joined 24-August 04
cool
thanks

#11
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,768 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
Working nicely now, thanks Totoymola :thumbup

#12
SiMoNsAyS

SiMoNsAyS

    C'mon you apes! You wanna live forever!?

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
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"


#13
prathapml

prathapml

    Follow the rules please :-)

  • Patrons
  • 6,791 posts
  • Joined 14-November 03
  • OS:Windows 8 x64
  • Country: Country Flag
nice tweak! :thumbup
Posted ImageCheers !!!   Donate to MSFN and Help Keep This Site Running
||Please Read the Forum Rules||  Etiquette   || Welcome to MSFN - Forum Basics || Before posting
prathapml :: MSFN Supermod :: Private Message me if you ever have a problem while at MSFN

#14
Afterdawn

Afterdawn

    Member

  • Member
  • PipPip
  • 179 posts
  • Joined 04-November 04
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.
I went to the doctor the other day and he said I was a paranoid schizophrenic... Well, he didn't actually say it, but we know what he was thinking.

#15
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
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.
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#16
Afterdawn

Afterdawn

    Member

  • Member
  • PipPip
  • 179 posts
  • Joined 04-November 04
@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!
I went to the doctor the other day and he said I was a paranoid schizophrenic... Well, he didn't actually say it, but we know what he was thinking.

#17
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,546 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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>

#18
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04
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:
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#19
Afterdawn

Afterdawn

    Member

  • Member
  • PipPip
  • 179 posts
  • Joined 04-November 04
@totoymola

You can easily edit it yourself. Import the tweak in the registry, change the value with regedit and then export it again.
I went to the doctor the other day and he said I was a paranoid schizophrenic... Well, he didn't actually say it, but we know what he was thinking.

#20
matrix0978

matrix0978

    Web Guru

  • Member
  • PipPipPipPipPip
  • 814 posts
  • Joined 17-August 04
  • OS:none specified
  • Country: Country Flag
Where would you put the dirlist.inf?$OEM$?
Images in signatures shall NOT exceed a total of 300x100 and 80kb.

#21
swgreed

swgreed

    Unofficial Service Pack & Codec Pack maintainer

  • Member
  • PipPipPip
  • 454 posts
  • Joined 18-August 03

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)

#22
SiMoNsAyS

SiMoNsAyS

    C'mon you apes! You wanna live forever!?

  • Patrons
  • 3,455 posts
  • Joined 17-May 04
is there any difference between HKCU\Folder and HKCU\Directory?

#23
Afterdawn

Afterdawn

    Member

  • Member
  • PipPip
  • 179 posts
  • Joined 04-November 04
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.
I went to the doctor the other day and he said I was a paranoid schizophrenic... Well, he didn't actually say it, but we know what he was thinking.

#24
totoymola

totoymola

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 944 posts
  • Joined 24-September 04

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". :)
Picasa2 MSI ----------- ResEdit MSI
DOWNLOAD ------------ DOWNLOAD

#25
swgreed

swgreed

    Unofficial Service Pack & Codec Pack maintainer

  • Member
  • PipPipPip
  • 454 posts
  • Joined 18-August 03
my fault..

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users