We
 are working on many files & folder in Windows PC or laptop & 
there are chances that we may end up adding or deleting files & 
folders regularly. These files & folders could be very important for
 us & the other person can edit them without our instruction. This 
article will help us in keeping track of which file or folder is edited 
with their respective date, time, size, etc.
In this post, we 
will learn how to retrieve a list of files in a folder in Excel. We will
 import all the files and folder details in Excel to keep track of file 
size, type, and modified date.
To keep track of the recently 
modified files or folders, excel is a smart option to keep track of 
important business documents or images. There is not a single step 
solution that can help us; however, in Windows 7, there is a workaround.
 With Command Prompt, we can get the list of files having a directory 
list in a text document & then this text file can be imported in 
Excel.
We need to follow the below steps:
- Press “Win + E”shortcut key to open Windows Explorer and locate the folder for which you need a file list (D:\Test Folder in this example)
- Hold the “Shift” key, right click on the folder and select “Open Command Window Here”
- This only works with folders & not with libraries. Refer below image 
                      
- Clicking on command window will open Command Prompt
 
- Type “dir /b >extractlist.txt” without quotes and press “Enter key
- This will create a text file name “extractlist” containing list of all the files stored in “Test Folder”
  
- To include file sizes and dates, we will type “dir >extractlist.txt”and press “Enter key”
 
- This will open the directory list with all the files name, size & last saved time
 
- To include files in sub-directories, type “dir /b /s >extractlist.txt” to create a list of files with the full directory structure
 
- This will contain the name of the file in a structured way
 
- The next step is to open Microsoft Excel
- Click on File & Open to bring up the Open dialog window or press “Ctrl-O” shortcut key
 
- Select the folder in which the file is saved
- Click the file type drop-down menu and select “Text Files”
 
- Select the “extractlist.txt”& click on Open button
- Text Import Wizard will be opened
 
- Click on Next
 
- Click on Finish button.
 
- Excel file will be imported; refer below image
 
Following above steps, we can keep a track of last modified date & time, file types, list of files, files size & many more details.
Conclusion: This article will be helpful in organizing files and folders into Excel sheet. This would be really helpful in case any important file or folder gets deleted. The data stored in Excel file will be saved & can help us in restoring the file.
 

 
 
