Recursively extract metadata from files in folder structure
  • PowerShell 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-21 07:26:47 -04:00
.github/workflows Update mirror-to-codeberg.yml 2026-03-25 10:57:12 -04:00
src Update FilesMetadata.ps1 2026-08-11 14:50:48 -04:00
.gitignore Update .gitignore 2026-10-21 07:26:47 -04:00
README.md Update README.md 2026-06-17 09:42:48 -04:00

Metadata-Extract

This code recursively extracts metadata from files in a folder structure.

Important

Requires PowerShell 7.0 or later due to use of ForEach-Object -Parallel (not available in Windows PowerShell 5.1).

Run $PSVersionTable.PSVersion to check your version.

Legend

Column Name Windows Property Description
file_name System.FileName The file name, including its extension.
location System.ItemFolderPathDisplay The user-friendly display path of an item's parent folder.
size_bytes System.Size The system-provided file system size of the item, in bytes.
date_added_to_drive System.DateCreated The date and time the item was created on the file system where it is currently located.
date_modified_in_drive System.DateModified The date and time the item was last modified on the file system where it is currently located.
date_accessed_in_drive System.DateAccessed The date and time the item was last accessed on the file system where it is currently located.
author* System.Author The author or authors of the document.
last_saved_by* System.Document.LastAuthor The last author of the document.
revision_number* System.Document.RevisionNumber The version of the document.
date_document_created* System.Document.DateCreated The date and time the document was created. This information is stored in the document, not obtained from the file system.
date_document_last_saved* System.Document.DateSaved The date and time the document was last saved. This information is stored in the document, not obtained from the file system.

* These metadata fields are exclusive to Microsoft Office file formats (.doc, .docx, .xls, .xlsx, .ppt, .pptx).