How to export a directory hierarchical structure (with Extended File Details)?

Get help with using AutoHotkey and its commands and hotkeys
omareg94
Posts: 67
Joined: 27 Jun 2016, 22:46

How to export a directory hierarchical structure (with Extended File Details)?

Post by omareg94 » 18 Dec 2017, 02:28

I need hierarchical listing of all files along with Extended File Details.

My question is similar to How can I export a directory structure? Both answers mentioning tree and Get-ChildItem commands are good for me, but I just want to add to each item the Extended File Details.

Extended File Details I want are:
  • Full Path (e.g. I:\MS\Ly\Video\122453.mp4)
  • File Type (in the format EXT - DESCRIPTION, e.g. MP4 - MPEG-4 video files)
  • Size (e.g. 21.78 MB) (Also, I need to be able to show this in bytes)
  • Created (File creation date, e.g. 21-Nov-17 1:45:15 AM)
  • Modified (File modification date, e.g. 21-Nov-17 1:45:17 AM)
  • Accessed (Last file Access date, e.g. 23-Nov-17 2:30:03 PM)
Example of Extended File Details that I can get from the context menu in Bulk Rename Utility:

Code: Select all

Filename    Parent Folder   Full Path   File Type   Size    Created Modified    Accessed
122453.mp4  Video   I:\MS\Ly\Video\122453.mp4   MP4 - MPEG-4 video files    21.78 MB    21-Nov-17 1:45:15 AM    21-Nov-17 1:45:17 AM    23-Nov-17 2:30:03 PM
Example of the output I want:

Code: Select all

I:
├───Folder A          ■[▪«Parent Folder: I:\», ▪«Full Path: I:\Folder A», ▪«File Type:  File folder», «Size: 65.34 MB (65,343,693 B) — Contains: 3 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───File A1.mp4          ■[▪«Parent Folder: Folder A», ▪«Full Path: I:\Folder A\File A1.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───File A2.mp4          ■[▪«Parent Folder: Folder A», ▪«Full Path: I:\Folder A\File A2.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   └───File A3.mp4          ■[▪«Parent Folder: Folder A», ▪«Full Path: I:\Folder A\File A3.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
├───Folder B          ■[▪«Parent Folder: I:\», ▪«Full Path: I:\Folder B», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   └───File B1.mp4          ■[▪«Parent Folder: Folder B», ▪«Full Path: I:\Folder B\File B1.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B)», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
├───Folder C          ■[▪«Parent Folder: I:\», ▪«Full Path: I:\Folder C», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 1 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   └───Folder C1          ■[▪«Parent Folder: Folder C», ▪«Full Path: I:\Folder C\Folder C1», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│       └───File C1a.mp4          ■[▪«Parent Folder: Folder C1», ▪«Full Path: I:\Folder C\Folder C1\File C1a.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
├───Folder D          ■[▪«Parent Folder: I:\», ▪«Full Path: I:\Folder D», ▪«File Type:  File folder», «Size: 87.12 MB (87,124,924 B) — Contains: 4 Files, 6 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───Folder D1          ■[▪«Parent Folder: Folder D», ▪«Full Path: I:\Folder D\Folder D1», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 2 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │   └───Folder D1a          ■[▪«Parent Folder: Folder D1», ▪«Full Path: I:\Folder D\Folder D1\Folder D1a», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 1 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │       └───Folder D1a1          ■[▪«Parent Folder: Folder D1a», ▪«Full Path: I:\Folder D\Folder D1\Folder D1a\Folder D1a1», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │           └───File D1a1a.mp4          ■[▪«Parent Folder: Folder D1a1», ▪«Full Path: I:\Folder D\Folder D1\Folder D1a\Folder D1a1\File D1a1a.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───Folder D2          ■[▪«Parent Folder: Folder D», ▪«Full Path: I:\Folder D\Folder D2», ▪«File Type:  File folder», «Size: 21.78 MB (21,781,231 B) — Contains: 1 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │   └───File D2a.mp4          ■[▪«Parent Folder: Folder D2», ▪«Full Path: I:\Folder D\Folder D2\File D2a.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───Folder D3          ■[▪«Parent Folder: Folder D», ▪«Full Path: I:\Folder D\Folder D3», ▪«File Type:  File folder», «Size: 43.56 MB (43,562,462 B) — Contains: 2 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │   ├───File D3a.mp4          ■[▪«Parent Folder: Folder D3», ▪«Full Path: I:\Folder D\Folder D3\File D3a.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   │   └───File D3b.mp4          ■[▪«Parent Folder: Folder D3», ▪«Full Path: I:\Folder D\Folder D3\File D3b.mp4», ▪«File Type: MP4 - MPEG-4 video files», «Size: 21.78 MB (21,781,231 B) », ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]
│   ├───Folder D4          ■[▪«Parent Folder: Folder D», ▪«Full Path: I:\Folder D\Folder D4», ▪«File Type:  File folder», «Size: 0 — Contains: 0 Files, 0 Folders», ▪«Created: 21-Nov-17 1:45:15 AM», ▪«Modified: 21-Nov-17 1:45:17 AM», ▪«Accessed: 23-Nov-17 2:30:03 PM»]

Return to “Ask For Help”