Saturday, 17 August 2013

Moving all files in a folder to a new child directory

Moving all files in a folder to a new child directory

In Powershell, how can I move all files in a folder to a new child directory?
I've tried mv c:\foo\* c:\foo\bar\, but all my files disappear and I get
an extension-less 'bar' file. I've also tried making the directory first
and then doing the move, but I get a The process cannot access the file
because it is being used by another process error, presumably because it
is then trying to move the 'bar' folder to itself.

No comments:

Post a Comment