79496034

Date: 2025-03-09 14:18:18
Score: 1
Natty:
Report link

The filter parameter works. You passed the mask incorrectly. Use:

$filesToMove = Get-ChildItem -Path $sourceFolder -File -Filter '*2*.zip'

Another asterisk character is missing after the number 2. Another tip: Choose an apostrophe instead of quotes when there is no variable within the string.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: João Mac