Jump to content

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


Recommended Posts

got a ? for Simonsays and anyone else not using the %temp% variable...ever notice that your dir listing includes the txt file you created? you should use the %temp% variable...also, when using > instead of >>, dirlist.txt gets overwritten anyways, so no real use in deleting the file.

Link to comment
Share on other sites


this one :

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

That's not gonna work, because you omitted the extra percent signs (%) on this part.

DIR ""%1\"" /B /O /S>""%1\""\"_CONTENTS LIST.TXT""

:)

Link to comment
Share on other sites

Dunno , but for me its working with only one % , if I use two then the list is empty and

gets names like  %1_CONTENTS LIST.TXT

we had that once, read my last post!!

you'll need '%%1' if you put the command into a batch file!! if you execute it directly on the command prompt then '%1' works!

Link to comment
Share on other sites

As far as I've tested my reg- and batch-file I've had no problems with it. Anyone who does have complications? Mine doesn't include the TXT-file itself in the directory. With very long listings I don't have the problem that notepad shows a blank document.

Link to comment
Share on other sites

:w00t: lolol

Originally you wanted to just create the file and % variables.

I gave you both but threw in that open in Notepad which adds more to it included the dos window staying open but Simon corrected. Theres ways to get exactly what you want but its just playing around with the strings.

1 thing I'm definitely against is create a batch I have to call a string to run it, Good Grief. :no: wano for cocka. Play with the strings. I don't have time right now.

EDIT: BTW Its a good discussion and if someone starts at the top and reads through all the things they should learn something today. :thumbup

Edited by maxXPsoft
Link to comment
Share on other sites

  • 4 weeks later...

The following DirList.reg is an improved version of what's gone before.

Pros

File inside the selected folder

Doesn't include itself in the list (Except if you right click a drive, where it goes right to the top of the list for manual removal)

Opens in the default text viewer

Waits for file to be created before opening

Cons

It will throw an error if you right click is on a folder with a space in the path /name, (The file is still created, just cannot be auto opened, due to the space)

This error was present in all versions, trying to use the foldername as part of the filename!

If someone can fix it please let me know

<Edit>

an inf version of this file has been added here

</Edit>

<Edit 2>

Red colour and increased font size added for people who dont read too good...

</Edit>

DirList.reg

Edited by Yzöwl
Link to comment
Share on other sites

@Yzöwl, didn't had enough time yesterday (until the forum upgrade lol) to pm you about the "space bug"

%COMSPEC% /c DIR  /-p /b /s /o:ge "%1" >> Index.txt && move /y Index.txt "%1"&& start "" /w /b "%1\Index.txt"

look at the last "%1\Index.txt", you forgot the quotes so if there was a space on the path, then file won't be oppened ;):thumbup

Link to comment
Share on other sites

@ SiMoNsAyS

Yes, you're right, I found that problem myself, and made the change directly in the registry, just forgot to update it in the command line of the notes I used for my PM.

Just in case anyone else is interested in the version SiMoNsAyS mentions above, this one doesn't use the folder name as part of the created text file name, therefore will work at all times, even with a space in the filename. All other features are the same as this version

You can download a inf version of it below, which is of course uninstallable from Add /Remove Programs; (just look for Right Click - Directory Listing).

DirList.inf

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