Jump to content

listing all folder contents, in a text file


prathapml

Recommended Posts

the next time you want to make a list of files in a folder, just go to that folder in a command prompt. Then run this command:

dir /B /S >> file-list.txt

-OR-

tree /F /A >> file-list.txt

That will make a new file in that folder containing a list of all files.

Link to comment
Share on other sites


Released that over 2 years ago in a BETA of my Tweak app but heres the reg stuff will do same thing and open it in Notepad. No, I discovered this elsewhere I only refined it better.

Now you simply right click the folder and choose the Dir List

I enclosed it in a REG_Expand_SZ so it will dynamically get the systemdrive

Want to toy with it more? Open a command prompt on a folder and type Dir /?

BTW

 sucks nowadays adding extra BS not needed so maybe this quote will do.
Edited by maxXPsoft
Link to comment
Share on other sites

Released that over 2 years ago in a BETA of my Tweak app but heres the reg stuff will do same thing and open it in Notepad. No, I discovered this elsewhere I only refined it better.

...

It adds Dir List to R click menu OK but doesn't actually write anything in the txt file (the first time it runs it asks me to create one). The cmd window keeps saying:

The system cannot find the file specified.

Or have I missed something?

Link to comment
Share on other sites

Yeah, must have forgot.... :lol:

Anyways, this is for a different purpose. Plus its meant to be usable straightaway without 3rd party tools, so PrintFolder outside the purview of this.

And since this is meant to be used in a scripted unattend, a REG for right-click is also outside purview.

Link to comment
Share on other sites

Why not try this.

Step 1

You make a bat file with this command and name the bat file, filelist.bat

here's the command!

dir /a /-p /o:gen >filelisting.txt

Step 2

Now copy that bat file to the windows folder.

Step 3

make a reg file

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\Filelister]

[HKEY_CLASSES_ROOT\Folder\shell\Filelister\command]

@="C:\\WINDOWS\\filelist.bat \"%1\""

Make sure you have the same name of the (filelist.bat) corresponding to the regfile. You name it what ever you want really.

Thats it!

You should get a document called filelisting.txt.

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