Powershell - filenames that match two (or more) pattes

خرید بک لینک

To find files in a directory that have both "foo" and "bar" in the filename, we can use:

Get-ChildItem | Where-Object {$_.Name -like "foo" -and $_.Name -like "bar"}

Is there a more elegant way to write (or query for) this?

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 243 تاريخ: دوشنبه 3 خرداد 1395 ساعت: 20:24

صفحه بندی