• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Generating a .txt based file list in Windows 7

Joined
Feb 20, 2008
Messages
4,628 (0.74/day)
Location
where everyone wants to be
System Name Everchanging
Processor AMD Ryzen 9 5900X
Motherboard ASUS ROG Crosshair Dark Hero
Cooling Arctic Cooling Liquid Freezer 2 420mm
Memory 2x16GB Corsair DDR4 3600 CL16
Video Card(s) eVGA RTX 3090 Ti FTW3
Storage Samsung 980 Pro 256GB, Samsung 980 Pro 2TB
Display(s) 2xSamsung 28" 4k HDR 144Hz
Case Fractal Meshify 2 XL
Audio Device(s) fiio K9 to Hifiman Sundara's via 4.4mm balanced cable
Power Supply Seasonic Prime TX 850w
Mouse Corsair Harpoon Wireless RGB
Keyboard Corsair K70 RGB PRO
Software Windows 11 x64
I want to be able to generate a .txt file that lists all the files and folders in a specific folder on my PC, but don't know the name of any programs that do that. Searched on google a bit and came up with this guide, but it's for XP and I can't seem to find some of the folder options to modify the .bat file. Any suggestions? Thanks

http://www.theeldergeek.com/file_list_generator.htm

EDIT: The .bat file will do what I want if it is in the folder I want to do it in, but the option I want to add is having the right click option that it shows.
 
dir > file.txt

dir /? to see options to format your output
 
dir %1 /a /s /b > Filelist.txt

Add the directory as first argument when running the batch file. %1 is the first argument. You might want to add a path to the output file. You can use >> instead of > to append.
 
dir %1 /a /s /b > Filelist.txt

Add the directory as first argument when running the batch file. %1 is the first argument. You might want to add a path to the output file. You can use >> instead of > to append.

Could he not use a wildacard ?. So it be dir %1 /a /s /b > *.txt and then it would list all .TXT files then.
 
No, that > bla.txt is the target file to write to. You could use a wildcard in the argument, ie c:\windows\*.txt which would list all dlls in c:\windows. But adding that to a simple right-click would be tricky.

Basically you would execute fancyfile.bat c:\windows\*.txt, fancyfile.bat would then write all .txt files to bla.txt.
 
Maybe you will find this info useful.

:)

Edit: Oops , sorry I was a sleep and had not gotten any caffeine. Same link.

Maybe this will make up for it. Takes a little tweaking and you will have to add a Text filter, but you can customize it. And, it adds a right click context menu item. And, it is free. Works in Windows 7 64 bit.

Directory Printer v5.3.2

ptdirprn.gif
 
Last edited:
Back
Top