Custom Search
Join the PC homebuilding revolution! Read the all-new, FREE 200-page online guide: How to Build Your Own PC!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
Results 1 to 8 of 8

Thread: How can I print a list of all folders, filenames, and programs?

  1. #1

    How can I print a list of all folders, filenames, and programs?

    I'm interested in printing out a hard copy of a list of all folders PLUS all filenames within them, as well as a list of all programs on my computer.

    Is there a way to do this within Windows XP Pro., or will I need to download a secondary utility?

  2. #2
    Join Date
    Oct 2006
    Posts
    253
    Use cmd to open up a DOS window, go to the drive root (<cd\>), type in <dir/s *.*> to get the list. Use </p> at the end to get a details view or </w> to just get the names. As for printing, the obvious way would be to try <print dir/s *.* /p> (or </w>), but I hope you have a LOT of paper ready if you want to try that.
    Last edited by nuz; 05-15-2009 at 05:29 PM. Reason: typo

  3. #3
    Join Date
    Jul 2001
    Location
    Wyncote, PA, USA
    Posts
    10,048
    Quote Originally Posted by nuz View Post
    Use cmd to open up a DOS window, go to the drive root (<cd\>), type in <dir/s *.*> to get the list. Use </p> at the end to get a details view or </w> to just get the names. As for printing, the obvious way would be to try <print dir/s *.* /p> (or </w>), but I hope you have a LOT of paper ready if you want to try that.
    When you get to the command prompt type:

    dir *.* /s >c:\filelist.txt

    This will create a text file in the root directory that can be viewed with any word processor and formatted and printed in nay way you like.
    No two moments are alike and a person who thinks that any two moments are alike has never lived.

    A.J. Heschel

  4. #4
    Join Date
    Oct 2001
    Location
    N of the S of Ireland
    Posts
    20,490
    as well as a list of all programs on my computer
    A list of keys showing all formally installed Windows programs can be seen at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uni nstall

    You can take screenshots as one way of recording them or grab Belarc Advisor.

    The A43 File Manager's File Menu has a nice simple way of creating a file with a list of the contents of the currently selected folder but it is not in any way recursive so probably no good for your needs. If you want to embellish what the two other responders have written first consider all the dir options and decide how you want your file display to be customized for your purposes.

    Dir /? gives the following in WXP:-
    Displays a list of files and subdirectories in a directory.

    DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
    [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

    [drive:][path][filename]
    Specifies drive, directory, and/or files to list.

    /A Displays files with specified attributes.
    attributes D Directories R Read-only files
    H Hidden files A Files ready for archiving
    S System files - Prefix meaning not
    /B Uses bare format (no heading information or summary).
    /C Display the thousand separator in file sizes. This is the
    default. Use /-C to disable display of separator.
    /D Same as wide but files are list sorted by column.
    /L Uses lowercase.
    /N New long list format where filenames are on the far right.
    /O List by files in sorted order.
    sortorder N By name (alphabetic) S By size (smallest first)
    E By extension (alphabetic) D By date/time (oldest first)
    G Group directories first - Prefix to reverse order
    /P Pauses after each screenful of information.
    /Q Display the owner of the file.
    /S Displays files in specified directory and all subdirectories.
    /T Controls which time field displayed or used for sorting
    timefield C Creation
    A Last Access
    W Last Written
    /W Uses wide list format.
    /X This displays the short names generated for non-8dot3 file
    names. The format is that of /N with the short name inserted
    before the long name. If no short name is present, blanks are
    displayed in its place.
    /4 Displays four-digit years

    Switches may be preset in the DIRCMD environment variable. Override
    preset switches by prefixing any switch with - (hyphen)--for example, /-W.
    So I recommend you enter the following into notepad, save as filelist.bat and run that batch file when ready (but edited as takes your fancy). The output of the following line omits headings/summaries, is fully recursive, groups folders first and sorts by name. Be prepared to wait as the filelist.txt file is created. Mine was nearly 8MB in size - (105,657 lines of text!).
    Code:
    dir C:\ /o:gn /b /s > C:\filelist.txt
    edit: maybe one should use either o:g or o:n and not both together.
    Last edited by Paul Komski; 05-16-2009 at 01:55 AM.
    Take nice care of yourselves - Paul - ♪ -
    Help to start using BiNG. Some stuff about Boot CDs & Data Recovery Basics & Back-up using Knoppix.

  5. #5
    Join Date
    Oct 2006
    Posts
    253
    Forgot to add this on my last post, you'll have to repeat this for each partition. If you're in C: to start with, type <D:> for drive D:, then E:, F: as appropriate. If you're printing to file as classics suggestedd (much better idea than mine, btw) you probably want to create separate text files for each drive, just to be sure they don't overwrite. It's been a very long time since I've used DOS commands, so I'm not sure whether the default edit option is over write or append.

  6. #6
    Join Date
    Oct 2001
    Location
    N of the S of Ireland
    Posts
    20,490
    If you're in C: to start with, type <D:> for drive D:, then E:, F: as appropriate.
    When issuing commands in DOS the current position is always the default but no matter where the prompt happens to be one can actually always specify the path rather than change directories to get there and create a new default position.

    I'm not sure whether the default edit option is over write or append
    A single > always writes a new file. A double >> appends to an existing file.

    It's been a very long time since I've used DOS commands
    If you are unsure or can't remember then maybe be cautious about posting advice.
    Take nice care of yourselves - Paul - ♪ -
    Help to start using BiNG. Some stuff about Boot CDs & Data Recovery Basics & Back-up using Knoppix.

  7. #7
    Quote Originally Posted by Paul Komski View Post
    A list of keys showing all formally installed Windows programs can be seen at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uni nstall

    You can take screenshots as one way of recording them or grab Belarc Advisor.

    The A43 File Manager's File Menu has a nice simple way of creating a file with a list of the contents of the currently selected folder but it is not in any way recursive so probably no good for your needs. If you want to embellish what the two other responders have written first consider all the dir options and decide how you want your file display to be customized for your purposes.

    Dir /? gives the following in WXP:-

    So I recommend you enter the following into notepad, save as filelist.bat and run that batch file when ready (but edited as takes your fancy). The output of the following line omits headings/summaries, is fully recursive, groups folders first and sorts by name. Be prepared to wait as the filelist.txt file is created. Mine was nearly 8MB in size - (105,657 lines of text!).
    Code:
    dir C:\ /o:gn /b /s > C:\filelist.txt
    edit: maybe one should use either o:g or o:n and not both together.
    Thanks, everyone, for the suggestions. The batch file is perfect.

    Two further questions:

    1) Will the .txt files overwrite themselves, or will they be saved as 1,2,3, etc.?
    2) Can I use XP's scheduling service to run this .bat file once every night?

  8. #8
    Join Date
    Oct 2001
    Location
    N of the S of Ireland
    Posts
    20,490
    Try

    Code:
    dir C:\ /o:gn /b /s > C:\filelist.txt
    ren C:\filelist.txt %date:~-4,4%%date:~-7,2%%date:~-10,2%.log
    for a datestamped .log file

    or maybe

    Code:
    dir C:\ /o:gn /b /s > C:\filelist.txt
    copy C:\filelist.txt C:\filelist.log
    ren C:\filelist.log %date:~-4,4%%date:~-7,2%%date:~-10,2%.log
    You can certainly use task scheduler to run a batch file. I use it as an alarm call that references a loud sound file.

    Code:
    :TOP
    
    start mplay32.exe /play /close D:\My Documents\My Music\MMEDIA\SIREN1.WAV
    sleep 10
    
    GOTO TOP
    Forgot to say that yes if you use a > it creates new and overwrites old
    Last edited by Paul Komski; 05-19-2009 at 08:24 AM.
    Take nice care of yourselves - Paul - ♪ -
    Help to start using BiNG. Some stuff about Boot CDs & Data Recovery Basics & Back-up using Knoppix.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •