Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

I currently have a script that grabs the files I want but now I want to find the newest folder and dump my information into it and a csv

$
0
0

Currently I have this script:

$dir = "C:\Users\test1"
Get-ChildItem -Path $dir -Recurse -Include '*.PNG' | Sort-Object Exists -Descending | Select-Object -First 10

Which grabs 10 files but now I would like to find the newest folder and then dump each parent folder and the newest data file to a csv. I'm not really sure where to begin. 


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>