2
You can use the powershell script below to reach your needs.
$copy=Get-PSDrive -PSProvider FileSystem | %{ Get-ChildItem $_.Root -directory -Recurse -force -ErrorAction SilentlyContinue| Where-Object {$_.basename -match ".*30$"}}
Copy-Item -Path $copy.Fullname -Destination D:\TEST\
You just need to change the "D:\TEST\" in the code to the path where you want to place these folders.
Note: This code is to copy the matching folders to the new folder. If you want to cut them to a new folder, you need to change the first "Copy" in the second line of code to "Move". Also, some folders may contain system files and you may not have permission to move them.
It is a sheduled task or one-off? – Akina – 2018-08-30T05:12:46.630
1
I would consider Powershell. You can open a Powershell prompt and use the move-item (https://docs.microsoft.com/powershell/module/microsoft.powershell.management/move-item) command, that will take *30 as the -Path. E.g.
– HelpingHand – 2018-08-30T05:51:10.383move-item C:\test\*30 C:\temp\