# ./cplist.sh <file list path> <source directory path> <target directory path>For this example these are the files in the ./original-files directory:
aaa.txtAnd here is the contents of the ./file-list.txt file:
aaaThe script will then detect all files matching the case-insensitive pattern file-name* in the source directory.
# ./cplist.sh ./file-list.txt ./original-files ./new-files
File list: './list.txt'
Source directory: './original-files'
Target directory: './new-files'
Searching for file: 'aaa.txt' (1)
Copying file: 'aaa.txt':
`./original-files/aaa.txt' -> `./new-files/aaa.txt'
Searching for file: 'bbb' (2)
Copying file: 'bbb':
`./original-files/Bbb.txt' -> `./new-files/Bbb.txt'
Searching for file: 'ccc' (3)
Copying file: 'ccc':
`./original-files/CCC.TXT' -> `./new-files/CCC.TXT'
Total files in target directory: 3