topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 5:03 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: generate a text report of all the subfolders and files of a directory  (Read 9337 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
hello!

I need a program that will generate a text report of all the subfolders and files of a directory

is there any?

thanks!

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
I use Directory Opus file manager, but there are other (& possibly free ones).

I used to use Karen Kenworthy's Directory Printer but that hasnt been updated since 2009 (and wont be updated in the future) - dont know if it works with Windows 7, I used it on XP fine
Tom

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
I second Karen's Directory Printer, and I can report in that it does still work on Windows 7.

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
hmm, it definately looks like what I need, but the problem is that it doesnt generate a comprehensive report, where it shows how files, subfolders and folders are related each other (which belongs where)

any hint?


Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
-yes, it does. The problem is that there is no extra line break, so you are not seeing it. Look for the word FOLDER.


x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Just curious, is "tree /f" at a command prompt not sufficient?
vi vi vi - editor of the beast

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
Just curious, is "tree /f" at a command prompt not sufficient?

I want to know more about this, but I get this error:

'tree' is not recognized as an internal or external command,
operable program or batch file.

any hint?

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Hmm, I know it was in XP, and I tried it on my Win 7 64-bit box before I posted.  Maybe it's in the support tools package, or resource kit?  (No, I just checked both of those.)

The program draws a very plain tree of folders (and optionally filenames) to standard output, which you can redirect to a file.  If you add the /a switch it uses normal ASCII characters for the tree part, like this:

+---.idlerc
+---7ff2f154e9b0e698b1391e81c8b4cd58
+---88dfc9e137283755534b27faa983ae76
+---Identities
|   +---{3C5BEFD7-288D-4C10-A534-8FEB19793A1A}
|   \---{A67B7115-600B-448C-AA0F-7E6FFF1A467E}
+---nb-75-files
|       itg-nb75-backup_exit_notify.cmd
|       itg-nb75-nbmail.cmd
|       itg-old-backup_exit_notify.cmd
|       itg-old-nbmail.cmd
|       nb75-original-backup_exit_notify.cmd
|       nb75-original-nbmail.cmd
|
+---Program Files
|   \---Common Files
|       \---Microsoft Shared
|           \---DW
|               |   DW20.EXE
|               |   DWDCW20.DLL
|               |   DWTRIG20.EXE
|               |
|               +---1025
|               |       DWINTL20.DLL
|               |
|               +---1028
|               |       DWINTL20.DLL
vi vi vi - editor of the beast

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Tree.com should be in the windows\system32 folder of your system drive.  Can you try doing the command this way?  Navigate to a folder, then type in:

   %windir%\system32\tree.com /f
vi vi vi - editor of the beast

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
interesting, but there seem to be many versatile solutions

fyi, googling "print directory" returns many solutions for this

finding the correct search terms is the key to success! :D

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
Tree.com should be in the windows\system32 folder of your system drive.  Can you try doing the command this way?  Navigate to a folder, then type in:

   %windir%\system32\tree.com /f

yup, this works! thanks :)

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,544
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
In Win7-64bit Home Premium, the "tree" CLI (Command Line Interface) command can be used to do this in 3 different ways. You can produce your file listing in a single command string:

Suppose we want to make a nested tree listing from (say), "C:\Windows\Boot", then we can try it:
  • (a) In Windows Explorer: go to the directory where you want to make a nested tree listing from (C:\Windows\Boot), then type into the address line "tree /f", then press the Enter key. Except I haven't figured out how to force the Command window to stay open after the task completes - "/p" for pause doesn't seem to work, neither does piping it into more with "|more" or outputting it to a file with something like ">C:temp\treetest.txt".
  • (b) In xplorer²: go to the directory where you want to make a nested tree listing from (C:\Windows\Boot), then type into the address line the "$" prefix, then "tree /f", then press the Enter key. That produces the tree correctly.
  • (c) From a Run box: Press Winkey+R, then type "cmd", then the CLI command "cd C:\Windows\Boot", then "tree /f", then press the Enter key. That produces the tree correctly.

A single command string: In both (b) and (c) you can just type in: tree /f /a >C:\temp\treetest.txt, then press the Enter key.
The "/a" switch makes the output in ASCII. The ">" redirects the output to the file "C:\temp\treetest.txt".
(When you print or display the file, ASCII looks clearer/neater than the extended character set that the switch "/f" apparently defaults to.)
« Last Edit: May 21, 2012, 09:10 PM by IainB, Reason: Minor corrections. »

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Just another way of doing it --- I have a batch script that I've been using for this for quite some time:

http://renegademinds...abid/56/Default.aspx

@echo Directory and sub-directory file listing dump by RenegadeMinds.com.
@echo Visit http://Renegademinds.com for more Windows tips and tricks
@echo and free software applications.
@echo ==================================================================
@echo ==================================================================
@echo Save this file as getDirList.bat in your SendTo directory.
@echo SendTo is under Documents and Settings in each user's directory.
@echo Right-click on any directory in Windows Explorer and choose
@echo Send To - getDirList.bat
@echo ==================================================================
@echo ==================================================================
@echo Dumping directory listing to c:\dirListing.txt
@echo        (This may take some time for large directory trees.)
@REM the /A switch lists all hidden and system files as well.
@REM the /S switch lists all subdirectories and their contents.
@dir %1 /A /S > c:\dirListing.txt
@echo Opening c:\dirListing.txt in Notepad (Close notepad to delete file)
@notepad c:\dirListing.txt
@echo Deleting c:\dirListing.txt
@del c:\dirListing.txt
@pause

Directions on using it are at the link. Basically, just add it to the "Send to" menu item, then right-click on a folder.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
infonautics directory list & print, Free and Pro versions (lifetime key)
Transportable, no installer.

http://www.infonauti.../directorylistprint/


click to enlarge:

dlppen3.jpggenerate a text report of all the subfolders and files of a directory




Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
another well respected family member is Where Is It?, now at version 2012.
$40 lifetime key. http://www.whereisit-soft.com/

WhereIsIt is an application written for Windows operating systems, and designed to help you maintain and organize a catalog of your computer media collection, including CD-ROMs and DVDs, audio CDs, diskettes, removable drives, hard drives, network drives, remote file servers, or any other present or future storage media device Windows can access as a drive.

The primary goal for WhereIsIt is to provide access to the contents of cataloged disks, even when they are not available on the system, or even they are not your own. You can browse their contents, search for files or folders you need, use imported descriptions and thumbnails, organize data using categories and flags etc

WhereIsIt can be used to handle any kind of data, including downloaded programs, magazine CD-ROMs, music collections like MP3s or audio CDs, graphics collections, document backups, etc

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
thanks!