Hi,
Does this work for you?
$SrcPath = "C:\source"
$DestPath = "C:\destination"
$Date = "08_27"
Set-Location $SrcPath
New-Item -ItemType Directory -Path "$DestPath\$Date" -force
Get-ChildItem -Path $Path -File -Recurse -Name *$Date* | Move-Item -Destination "$DestPath\$Date" -force
Best Regards,
Ian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.