on a Windows OS machine, let us say you want to extract all the files and folders within a folder called "Test" in the Root of your C Drive (C:\Test).
go to Run > cmd.
when the DOS window opens, do the following:
cd\
hit ENTER
cd Test
hit ENTER
dir /s > extract.csv
hit ENTER
that's it, the CSV file is created within the Test folder. open the CSV file in Excel.
you could experiment more with the switches for DIR command (by using the dir /? command), such as the /b, which provides the information in a different format and layout. you could club these two switches together in one, for e.g.:
dir /s /b > Test.csv
the /s switch helps in extracting files from within subdirectories (sans which only the file(s) in the root of the Test folder will be listed). the /b switch gets rid of a lot of superfluous information and gets right to spitting out the "folder\filename" data.
if you were to execute "dir /s /b" all by itself, the information would be displayed on the terminal (monitor / screen). what the ">" does is to spit that out into a flat file.
Bookmarks