Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I copy all files that match a filter and the directory structure to UNC path will powershell:

For example with the filter as "*2011_01_02*.bak":


To \\\meow\ with the result of:

share|improve this question
It sounds like it's raining cats and dogs over by you guys... –  Holocryptic May 20 '11 at 16:23

2 Answers 2

How about:

Copy-Item . -Destination "\\\meow\" -Filter "*2011_01_02*.bak" -Recurse

(Based on some fiddling on a test box.)

share|improve this answer

Using robocopy, something like the following does the trick:

Robocopy.exe .\ \\\meow *.ps1 /S

Not powershell, but seems to do the trick.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.