Answers for "get the latest file in a directory powershell"

0

get the latest file in a directory powershell

$dir = "C:\test_code"
$latest = Get-ChildItem -Path $dir | Sort-Object LastAccessTime -Descending | Select-Object -First 1
$latest.name
Posted by: Guest on September-15-2020

Code answers related to "get the latest file in a directory powershell"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language