Last active
September 12, 2022 08:59
-
-
Save Azooz2014/93792a16a1a51ca3e94b594ec47b6b77 to your computer and use it in GitHub Desktop.
Get Directories names with last write formated date and save it to csv file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = "" # Your Folder Path here. | |
Get-ChildItem -Directory -Depth 1 $path | | |
Select-Object @{ | |
name='Fullname'; # Can be replaced with Name if you want just directory name. | |
expression={$_.FullName} | |
}, @{ | |
name='LastWriteTime'; | |
expression={($_.LastWriteTime).toShortDateString()} | |
} | Export-Csv -Path "Output path" -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment