Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Variable in the file’s name filter.

$
0
0

Try
Get-ChildItem $source -Recurse -filter “aaa_bbb_$client_FULL.txt”

or

Get-ChildItem $source -Recurse -filter (“aaa_bbb_” + $client + “_FULL.txt”)

Filter expects a single string to define the filter criteria. Using + (concatenation) it only looks at the first string and treats the rest as different parameters


Viewing all articles
Browse latest Browse all 13067

Trending Articles