Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Copy a file from each subdirectory to one folder

$
0
0
Hi,I'm trying to do something like this:[code="plain"]Get-ChildItem -Path "\\drive\s*\*.txt" | ForEach-Object {Copy-Item "\\drive\Erik" }[/code]But it isn't working, and I'm not really getting anywhere with it. Any recommendations? I don't have a ton of time to research at the moment.Thanks

Viewing all articles
Browse latest Browse all 467

Trending Articles