Jump to content

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


Recommended Posts


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>

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

Link to comment
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)

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

Link to comment
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". :)

Link to comment
Share on other sites

Okay, I've created my own version that will:

- Name the file dirname.txt (like totoymola requested). Unfortunately i could only achieve this with the help of an batch file.

- Put the file in the parent dir (instead of in the same dir)

- If you'd try to list the files of a read-only medium, then the file will be written to the temporary dir (%temp%).

The file will be opened with the default application for .txt.

This is the reg-file:

Windows Registry Editor Version 5.00

;%SystemRoot%\system32\dirlist.cmd %1
[HKEY_CLASSES_ROOT\Folder\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,64,00,69,00,\
 72,00,6c,00,69,00,73,00,74,00,2e,00,63,00,6d,00,64,00,20,00,25,00,31,00,00,\
 00

... and this is the %SystemRoot%\System32\dirlist.cmd file:

@echo off
echo Touch > "%~n1.txt"
if exist "%~n1.txt" (
 dir "%1" /b /o /s > ..\%~n1.txt
 start "" ..\%~n1.txt
) else (
 dir "%1" /b /o /s > "%temp%\%~n1.txt"
 start "" "%temp%\%~n1.txt"
)

Link to comment
Share on other sites

Where would you put the dirlist.inf?$OEM$?

Yes, stick the following in your cmdlines.txt and add the dirlist.inf to the same folder, i.e. $OEM$

[Commands]
"rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 .\dirlist.inf"

Link to comment
Share on other sites

@Afterdawn, ok thanks :)

edit: after many time testing differents combinations, i've finished my regtweak file.

it's path and language independant and the difference with others is that mine's don't show that ugly command prompt while notepad is open

%COMSPEC% /C start /w /b dir %1 /-p /b /s /o:ge > "%1\dir_index.txt"|start /b notepad.exe "%1\dir_index.txt"

i've got a question, notepad don't wait until the .txt is fully writed so on a dir with a high amount of files it opens a blank document... anyway to solve it (i've used start /w but it doesn't work)?

Edited by SiMoNsAyS
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...