I'd use bash
anytime.
cat list.txt | xargs -I {} cp {} <destination folder>
Or, since I've come to prefer parallel
over xargs
:
cat list.txt | parallel cp {} <destination folder>
On Windows, I'd go with cygwin, but you might consider cmder, Git-for-Windows, WSL and more...
But you can do it almost as easily in Powershell
:
cat list.txt | ForEach {cp $_ <destination folder>}
Apparently, Microsoft wants a certain category of users to feel at ease using Powershell, because it recognizes several well-known commands from the UNIX world. These are but aliases to the equivalent cmdlets and a list can be found by invoking Get-Alias
(or simply alias
if you prefer):
cat -> Get-Content
clear -> Clear-Host
cp -> Copy-Item
curl -> Invoke-WebRequest
diff -> Compare-Object
echo -> Write-Output
history -> Get-History
kill -> Stop-Process
ls -> Get-ChildItem
man -> help
mount -> New-PSDrive
mv -> Move-Item
pwd -> Get-Location
rm -> Remove-Item
sleep -> Start-Sleep
wget -> Invoke-WebRequest