Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: PmbPhy on 29/05/2015 03:04:49

Title: How do I create a text list of files in a directory in Windows 8.1?
Post by: PmbPhy on 29/05/2015 03:04:49
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?
Title: Re: How do I create a text list of files in a directory in Windows 8.1?
Post by: Airthumbs on 02/06/2015 03:09:34
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.
Title: Re: How do I create a text list of files in a directory in Windows 8.1?
Post by: nicephotog on 17/06/2015 09:08:29
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

C:\WINDOWS\system32>

=====================================

=======   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

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back