So you don't want .dep
files inside folder1
, 2 etc.? Robocopy
/ xcopy
is usually a good choice. Powershell is slow for such a simple operation. If you just want the .dep
files in mainfolder
but not those inside the subfolders, try:
robocopy \\192.168.1.2\mainFolder \\192.168.1.2\copyFolder *.dep