Question

This is a new one for me so I'm pretty much flying blind.

I have a folder at 192.168.1.2\mainFolder that contains folder1, folder2, and folder3. Inside each of those folders are a handful of different file extentions, and a couple of files of each type. I need to take all files that exist inside mainFolder of the .dep type, and copy them to 192.168.1.2\copyFolder

copyFolder will not have any folders inside it, but just many many files.

What is the best way to go about doing this? I have been told by TPTB that robocopy would be helpful, however I have never used robocopy and thought you guys may know of something better

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top