How to get the creation time for each file and format it
14,206
You need to expand the CreationTime
property:
Get-ChildItem Dropbox |
Select-Object -ExpandProperty CreationTime |
Get-Date -f "yyyy-MM-dd hh:mm"
Author by
Forethinker
Asking questions, because the answer is out there for those who ask. Stay Curious Stay Mindful
Updated on June 07, 2022Comments
-
Forethinker almost 2 years
I can format the time of the files with the following command:
Get-ChildItem Dropbox | Get-Date -format "yyyy-MM-dd hh:mm"
I can get the CreationTime of the files with the following command:
Get-ChildItem Dropbox | Select-Object CreationTime
They blow up when I combine them together. How can I get the creation time in a format I desire?