How often do you need this?gold01 wrote:the question was to copy file (make duplicates) to a number of files (not one to one)
and according to the file names from the list
example: copy file a.pdf to 3 different files taking names from file list.txt (ss.pdf, 231.pdf, dd.pdf)
You could just open a PowerShell -Box, read in the file list, and create copies of origin.ext with names from the file list:
From:
C:\Temp\FileList.txt
Ghislers.ext
Total.ext
Commander.ext
C:\Temp\Origin.ext
To:
C:\Temp\Commander.ext
C:\Temp\FileList.txt
C:\Temp\Ghislers.ext
C:\Temp\Origin.ext
C:\Temp\Total.ext
USE PowerShell:
PS C:\Temp> ( Get-Content .\FileList.txt ) | ForEach{ Copy-Item -Path .\Origin.ext -Destination $_ }
PS C:\Temp>
Done.
In short:
PS C:\Temp> (gc .\FileList.txt)|%{copy .\Origin.ext $_}