Afterdawn Posted January 16, 2005 Share Posted January 16, 2005 @maxXPsoft: 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! Link to comment Share on other sites More sharing options...
Yzöwl Posted January 16, 2005 Share Posted January 16, 2005 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 detailsAlso 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 More sharing options...
totoymola Posted January 16, 2005 Author Share Posted January 16, 2005 Nice SiMoNsAyS, maxXPsoft and Yzöwl! We have a lot of options now. 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. Link to comment Share on other sites More sharing options...
Afterdawn Posted January 16, 2005 Share Posted January 16, 2005 @totoymolaYou can easily edit it yourself. Import the tweak in the registry, change the value with regedit and then export it again. Link to comment Share on other sites More sharing options...
matrix0978 Posted January 16, 2005 Share Posted January 16, 2005 Where would you put the dirlist.inf?$OEM$? Link to comment Share on other sites More sharing options...
creopard Posted January 16, 2005 Share Posted January 16, 2005 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 itreplace '%%1' by '%1' (tested on xpsp2) Link to comment Share on other sites More sharing options...
SiMoNsAyS Posted January 16, 2005 Share Posted January 16, 2005 is there any difference between HKCU\Folder and HKCU\Directory? Link to comment Share on other sites More sharing options...
Afterdawn Posted January 16, 2005 Share Posted January 16, 2005 Yes, Folder is for each folder you can imagine. These includes, directories, drives, recycle bin, my computer etcereta.Directory, is just.. directories. 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 More sharing options...
totoymola Posted January 16, 2005 Author Share Posted January 16, 2005 nice script, but it does not work correctly the way you posted itreplace '%%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\commandC:\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 More sharing options...
creopard Posted January 16, 2005 Share Posted January 16, 2005 my fault..i executed the "reg add..." directly instead of putting it into a batch-file! Link to comment Share on other sites More sharing options...
Afterdawn Posted January 16, 2005 Share Posted January 16, 2005 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 offecho 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 More sharing options...
Yzöwl Posted January 17, 2005 Share Posted January 17, 2005 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 More sharing options...
totoymola Posted January 17, 2005 Author Share Posted January 17, 2005 Nice Afterdawn! Could you explain to me what your code does? Because I don't understand hex values. Link to comment Share on other sites More sharing options...
Yzöwl Posted January 17, 2005 Share Posted January 17, 2005 It tells you in the comment, within his file, The right click executes the cmd file with this command%SystemRoot%\system32\dirlist.cmd %1 Link to comment Share on other sites More sharing options...
SiMoNsAyS Posted January 17, 2005 Share Posted January 17, 2005 (edited) @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 January 17, 2005 by SiMoNsAyS Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now