grouse_4
grouse_4

Reputation: 3

Extract "Date Modified" from all files in a directory

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

Upvotes: -1

Views: 1300

Answers (1)

Mogash
Mogash

Reputation: 130

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

Upvotes: 0

Related Questions