Extract filenames and file sizes


Command Line Basics

 


 

Go to command prompt

  1. Click on Start button

  2. Choose RUN option

  3. At open prompt, type cmd

  4. Press okay

  5. Command window appears

 

 

Enter command lines to output directory of files to txt file

  1. Open main directory (drag to cmd window)

  2. Change directory (cd) to desired folder

  3. Type in command: dir /s >myoutput.txt

  4. Press enter

  5. File is stored in directory given above

Figure 1: Command Prompt window

 

Figure 2: Output file

 

Note: The Windows command will put the output file into the current working directory.

 

Variations:     DIR *.tif /s /b /a-d >tifflist.txt

 

Open text file in excel

  1. Open excel

  2. Select File Open command

  3. Navigate to folder where txt file was sent

  4. Change file type to text

  5. Select file

  6. Press Open

  7. Text Wizard will pop up

 

 

Text Wizard

  1. Select Delimited option and press Next button

 

 

  1. Under Delimiters place check mark next to Space (lines will appear, use scroll bars to view how text will be split out)

 

  1. Press finished button

Data is displayed with columns for date of file, time of file, file size and file name…

 

… data for each sub folder is also included…

 

 

Tip: clean up data in the overall file by any combination of methods such as sorting, filtering, grouping or using formulas to group by object id