FlexiCopy copy selective files from a path into the destination. The copy operation will follow the folder structure from the source path. As contrast to Copy-Item built-in in Powershell (which recursively copy everthing), you can be selective for what files you want to copy.
- Run $Env:PSModulePath to find out where is the powershell module path.
- Copy FlexiCopy folder into one of the module path.
- In Powershell console, run import-module FlexiCopy to load the module.
Run Copy-Files -path <sourceFolder> -destination <destinationFolder> -fileList <file list>
-path: Base directory of folder where you want to copy from.
-destination: Base directory of folder where you want to copy to.
-fileList: Files you want to copy. The file list can contain path relative to the -path.
Sample of file list to copy (file.txt)
folder1\file1.txt
folder2\file2.txt
folder2\subfolder2a\file3.txt
Get-Content -Path file.txt | Copy-Files -path c:\source -destination c:\destination