hello
I have a txt file with file names and folder that contains sub-folders with lots of files I want to search in the folder the files from the list and copy the files to another directory.
are saying your file is named as above with the leading >spaceWhatever (mnemonically speaking)?
Also would you do cat -vet 1.txtand provide the output using markdown tags, pls.
It's easy to fix. Change the variable "$file" to "${file##*[[:blank:]]}" in the find command.
This is a universal solution, as noted above, perhaps a tabulation or several spaces acts as a separator, but it is quite possible that this will also work: "${file#* }"
cp: cannot stat 'to': No such file or directory
cp: cannot stat 'JLJA833J_CSM_Security_20190517021148+0000-[787ML017]': No such file or directory
maybe there is something else i should add and im missing ?
if its not rude, maybe you can try to write it from the beginning and see if it is working for you ?
many thanks
In my opinion, I understood. You have more than just filenames in your list. File names end with a .zip extension and need to be filtered? Or are there files both with the .zip extension and without any extension?
i have only file names in my list
they ends with .zip and these are the files i need to copy
in the folder where i want to run the find command there are files with .zip and without but i need to copy the files with .zip extension