Instantly Create A List Of All Files

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
This little trick is very useful, especially if you have a drive or folder with a lot of files, subfolders and subfiles. It allows you to quickly list all file names, including their location, size and the date the file was modified in a text file or spreadsheet.


click start, run, type cmd, press ok

Since the drive or file can be anything (depending on what you want to list), I have listed a few examples

Example 1:If you wanted all files located in the C:\Documents and Settings\John\My Documents Type the following (hit Enter after each line):

cd c:\

dir "C:\Documents and Settings\John\My Documents” /s > c:\List.txt


Example 2:If you wanted all files located in C:\ , you would type the following (hit Enter after each line):

cd c:\

dir “c:\” /s > c:\List.txt

Note that the basic format is:

dir ”location you want to search” /s > C:\AnyFileName.txt

The underlined text is what will change depending on what you are wanting to list and the filename that you choose.

The blue text is what will change depending on what you are wanting to list and the filename that you choose.

Type Exit or click on the “X” to close the command prompt then navigate to where you created the text file. If you double click the file, notepad will open with a list of all of files and subfolders and subfiles

If you have Excel Installed, you can open this in excel by first launching excel, then click Open, then navigate to where you created the text file (make sure you change the files of type, to all files) then open the file and excel will start the import wizard, follow excelÂ’s wizard instructions and viola you have your data in Excel!
 
Status
Not open for further replies.
Back
Top Bottom