PowerShell: Get the most recent file in a path

This answers what was the most recent change in a folder and subfolder.

gci $Path -Recurse |?{-not $_.PsIsContainer} | sort LastWriteTime | select -last 1

Comments are closed.

Post Navigation