I would like to make a script that detects a new file in different folders like:
/home/pedro/XX/file1_082018.zip
/home/pedro/XX/file2_082018.zip
where XX
indicates a non-fixed position country name (E.G. Brasil, Argentina, Chile, ...)
Once the new file has been detected, I would like to copy this file somewhere else:
cp /home/pedro/BR/file1_082018.zip /home2/pedro/BR/file1_082018.zip
And if the copy to the new folder is complete, send a mail to inform. New file /file1_082018.zip is available.