I am currently learning how to use PowerShell. I was wondering if it would be possible for someone to tell me how to copy multiple text files from multiple sub-directories using the command line portion of PowerShell. I know how to do this in regular CMD and it looks something like this:
for /f "delims=" %F in ('dir \*.txt /s/b') do copy "%~F" "C:\test\" /Y
But obviously this does not work in PowerShell and needs a good bit of tweaking. Any help would be much appreciated. Thanks!