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

Looking to display 10 files in a specific folder that end with a particular prefix

$
0
0

So far I have something that looks like this:

$dir = "C:\Users\testfolder"
Get-ChildItem -Path $dir | Sort-Object Exists -Descending | Select-Object -First 10

So I have been looking and from what I can tell I need something after sort-object but I cant figure anything out.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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