Extract "Date Modified" from all files in a directory

930 views Asked by At

I have a large shared directory with a lot of folders with sub-folders etc...These folders and sub-folders contains files.

For all files in this directory, I need to create a text file that writes all files paths [,] data_modified.

Can someone help me to write that as a PowerShell script?

Thx

1

There are 1 answers

3
Mogash On BEST ANSWER
Get-ChildItem -Path "C:\Temp\" -Recurse | Where-Object {$_.PSIsContainer  -eq 0} | Select-Object FullName, LastWriteTime | Out-File -FilePath "C:\files.txt"

Change the paths listed to your liking and it should work