1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Resolved How to create a file list in W7?

Discussion in 'Other PC Software' started by masonite, 2014/06/16.

  1. 2014/06/16
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Before you rush into print, please read my request carefully. I suspect the answer is not as simple as the title suggests.

    I'm trying to create a list of text files that are contained in multiple sub-folders inside a main folder. Locating the files was simple enough with Windows Explorer's "find" facility directed to search for *.txt.

    This yielded a list of 300 or so text files, with around 10 different paths.

    However, 30 or 40 of the files aren't relevant, so I want to delete them from the list. After that I'll want to order the columns, so that structure will need to be retained.

    Anyone able to suggest a method? Or suitable software?
     
  2. 2014/06/16
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    This may help:

    Open Windows Explorer and search for what you want
    When the search results populate, select all (Ctrl + A)
    Hold the Shift key and Right Click on the search results
    Select "Copy as Path "
    Paste into a notepad window

    The results will be formatted as:
    \path\file
    \path\file
     

  3. to hide this advert.

  4. 2014/06/16
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Thanks, TonyT: Only problem with that method is that the output structure is quite different to the Windows Explorer arrangement. One method that almost works is using Faststone Screen Capture to scroll\image the entire window (which is larger than the visible screen) and then save it-as a PDF. Apparently there are several apps (Soda, Able2Doc) that will convert a PDF to Word, which I assume would then make an editable columned list, but I'm trying to avoid buying more software.
     
  5. 2014/06/16
    antik

    antik Well-Known Member

    Joined:
    2008/01/15
    Messages:
    367
    Likes Received:
    26
    You might try an "old school" method that is fast and flexible.

    Open a command prompt. As an example, enter this command after the prompt:

    dir c:\*.txt/s/b/o:g>filelist.txt
    Press Enter

    The prompt will reappear when the report is complete. Enter exit to leave.

    This example lists all files with a .txt extension on drive C, including all sub-directories, listing only the directory and file names, groups the report by sub-directory, then puts the output in a text file named filelist.txt. Do a search to find where the file is put.

    Here is a list of all the options for the dir command.

    http://www.computerhope.com/dirhlp.htm
     
  6. 2014/06/16
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    The problem with that is that the pdf will have an image embedded in it, no text at all, just an image of text. You won't be able to edit the text. To do that you'd need some type very accurate of OCR software.
     
  7. 2014/06/16
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Thanks, TonyT - I thought there might be a catch to that conversion to Word - it sounded too good to be true.

    Antik, thanks also. That's a good tip and the resultant list isn't too bad. Do you think it might be possible to modify it with some of those qualifiers on the Computer Hope page?

    These, for example:
    /D Same as wide but files are list sorted by column.
    /N New long list format where filenames are on the far right.
    /W Uses wide list format.

    I tried to use these but they didn't seem to work. Maybe I needed to cull out some of your original qualifiers???
     
  8. 2014/06/17
    antik

    antik Well-Known Member

    Joined:
    2008/01/15
    Messages:
    367
    Likes Received:
    26
    Try your other choices by themselves first to see what they do, then add additional switches to see what changes.

    Also, Notepad won't properly display columns, so open with your WP.

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

    The order of the switches does matter. Look carefully at the syntax to see what comes first.

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

    I erred by putting the /s switch first. Should have stayed alphabetical.
     
    Last edited: 2014/06/17
  9. 2014/06/17
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Thanks Antik.

    You said
    Did you mean 'Open filelist.txt with Word'? Or change the command to read:
    'dir c:\*.txt/d/s>filelist.doc'?

    Several BTW's:
    1) I can confirm TonyT's statement that at least one app - Able2Doc - was unable to convert a PDF to a usable Word doc. Oh, it had a stab at it, and the doc was partly editable - lines of text could be altered or removed - but it was a bit of a mess.
    2) I have found a sort of workaround to my question: Because the text files are quite small in byte size, I copied the entire main parent directory to a temp location, did an Explorer search of it, then removed redundant files from the 'search results' as I felt necessary. This removed the files themselves, of course, but as they were only copies it didn't matter. Then I ordered the columns as required and did a Faststone scrolling save to yield a printable PDF. The result isn't perfect, but it'll do.

    However, I'll keep trying Antik's suggestions for future reference. If the result of the command-line could be a bit better organized, it could be easier than my workaround.
     
  10. 2014/06/17
    antik

    antik Well-Known Member

    Joined:
    2008/01/15
    Messages:
    367
    Likes Received:
    26
    (Quote) Did you mean 'Open filelist.txt with Word'? Or change the command to read:
    'dir c:\*.txt/d/s>filelist.doc'?

    Open filelist.txt with Word or Wordpad or another word processor.
     
  11. 2014/06/17
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Thanks Antik, but filelist.txt, opened in Word, looks much the same as when it's opened in Notepad.
    Maybe some of those alternative commands will give it a better look.
     
  12. 2014/06/18
    antik

    antik Well-Known Member

    Joined:
    2008/01/15
    Messages:
    367
    Likes Received:
    26
    The suggestion to use word was related to your desire to have columns. It is the /d switch which formats the report in columns.

    (Quote-you) These, for example:
    /D Same as wide but files are list sorted by column.

    (Quote-me) Also, Notepad won't properly display columns, so open with your WP.
     
  13. 2014/06/18
    masonite

    masonite Well-Known Member Thread Starter

    Joined:
    2002/09/02
    Messages:
    445
    Likes Received:
    1
    Again, thanks, Antik. I'll try the /D switch.
    Cheers :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.