The Naked Scientists

The Naked Scientists Forum

Author Topic: How do I create a text list of files in a directory in Windows 8.1?  (Read 2925 times)

Offline PmbPhy

  • Neilep Level Member
  • ******
  • Posts: 2760
  • Thanked: 38 times
    • View Profile
I have 10 directories containing PDF files of physics articles. There is a total of 318 files in those 10 directories. I need to write a list in a webpage for people to search to find what they're looking for. What I'd like to do is be able to have the computer generate a text file containing a list of the file names. Does anybody know how to do that in Windows 8.1?


Offline Airthumbs

  • Hero Member
  • *****
  • Posts: 958
  • Personal Text
    • View Profile
I just had a quick look as I am using 8.1.  Now I may be entirely off the mark here but this might work for you.  In the control panel go to the indexing options.  Under Modify, it allows you to choose a specific directory or folder. In the indexing options you can then select the advanced settings.  From the advanced setting you can then choose what type of files you want indexing.

I think the solution you are looking for may be available here. A little further investigation might be required from your part as to what results indexing files produces.  The location of the indexed files is displayed on the main menu of the indexing options.

Please make a backup before you try anything though!  I am certainly no expert on this but suspect the solution you are looking for lies within this indexing function.

Offline nicephotog

  • Sr. Member
  • ****
  • Posts: 387
  • Thanked: 7 times
  • H h H h H h H h H h
    • View Profile
    • Freeware Downloads
this would list millions of files with the sub-directories switch(/s) dir c:\ /s > c:\listfiles.txt

Put the line in a .bat file e.g. listdirectory.bat and click on it to run it (remember directory names that have spaces should be in quotes for the complete section e.g. "c:\program files" )

========== COMMAND PROMPT  ================
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>dir "c:\program files" > c:\filelist.txt

C:\WINDOWS\system32>dir c:\
 Volume in drive C is Windows
 Volume Serial Number is D6C4-E849

 Directory of c:\

21/11/2012  03:18 PM    <DIR>          Documents and Settings
17/06/2015  06:03 PM             2,794 filelist.txt
17/06/2015  05:41 PM            20,784 ggGina.log
05/02/2015  05:23 PM               552 languagesettings.txt
09/07/2010  12:09 PM       365,351,771 Office2007-SP2-x86-ALL.exe
17/06/2015  05:42 PM        16,300,032 Persi0.sys
05/02/2015  05:26 PM    <DIR>          Program Files
15/02/2008  09:41 AM             3,806 searchandreplace.vbs
05/02/2015  05:34 PM    <DIR>          shortcuts
21/01/2009  11:13 AM            43,008 WASP.dll
20/08/1997  01:22 PM           400,384 WBDBP32I.DLL
17/06/2015  12:39 PM    <DIR>          WINDOWS
               8 File(s)    382,123,131 bytes
               4 Dir(s)  65,351,102,464 bytes free



=======   LINUX SHELL PROMPT will list everything and place it on your desktop (-a is an alternate switch to -s meaning everything)

ls -s / > /home/theuser/Desktop/filelist.txt
« Last Edit: 17/06/2015 09:12:24 by nicephotog »

The Naked Scientists Forum


SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums