79495570

Date: 2025-03-09 07:56:58
Score: 1.5
Natty:
Report link

I’m guessing the issue may be that the -filter parameter works differently than you’re expecting. The .zip works because it matches all zip files but when you add that extra character, it is not reading it like you and I. For this, probably using regular expressions would help.

how about trying:

$filesToMove = Get-ChildItem -Path $sourceFolder -File -Filter “*.zip” | Where-Object { $_.Name -match “1\.zip$” }

Let me know how that works for you.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Anthony Miranda