how to extract a list of all the files and folders within a Windows OS folder onto Excel

 

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”

 

img1

 

  • This only works with folders & not with libraries. Refer below image

 

img2

 

  • Clicking on command window will open Command Prompt

 

img3

 

  • Type “dir /b >extractlist.txt” without quotes and press “Enter key”

 

img5

 

  • This will create a text file name “extractlist” containing list of all the files stored in “Test Folder”

 

img5

 

  • To include file sizes and dates, we will type “dir >extractlist.txt”and press “Enter key”

 

img6

 

  • This will open the directory list with all the files name, size & last saved time

 

img7

 

  • To include files in sub-directories, type “dir /b /s >extractlist.txt” to create a list of files with the full directory structure

 

img8

 

  • This will contain the name of the file in a structured way

 

img9

 

  • 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

 

img10

 

  • Select the folder in which the file is saved
  • Click the file type drop-down menu and select “Text Files”

 

img11

 

  • Select the “extractlist.txt”& click on Open button
  • Text Import Wizard will be opened

 

img12

 

  • Click on Next

 

img13

 

  • Click on Finish button

 

img14

 

  • Excel file will be imported; refer below image

 

img15

 

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.

 

If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.

We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at info@exceltip.com



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>