I have some files in a directory as follows.
source_dir:
ABCD.HRA.0014.2.200.png
ABCD.HRA.0015.2.200.png
ABCD.HRA.0016.2.200.png
MMNP.HRA.0016.2.200.png
I also have a text file with following content.
text.txt:
ABCD.HRA.0014
ABCD.HRA.0015
Now is there any way I can transfer the files as per the string mentioned in text.txt
.
After command
, source dir
and dest_dir
should be as follows.
source_dir:
ABCD.HRA.0016.2.200.png
MMNP.HRA.0016.2.200.png
dest_dir:
ABCD.HRA.0014.2.200.png
ABCD.HRA.0015.2.200.png