Automatic file movement between folders

Hello There,
Here is the use cases

Input folders

dropbox/project/abc/
dropbox/project/pqr/
dropbox/project/lmn/
dropbox/project/xyz/

Target Folders

/data/abc/
/data/pqr/
/data/lmn/
/data/xyz/

Need an efficient logic, that will iterate for each folders from a list of folders and check if

any files present in /data/abc/ if no then move all files present in dropbox/project/abc/
any files present in /data/pqr/ if no then move all files present in dropbox/project/abc/
any files present in /data/lmn/ if no then move all files present in dropbox/project/abc/
any files present in /data/xyz/ if no then move all files present in dropbox/project/abc/

if yes then send an email using mailx saying files already present in target folders cannot move

Need this script alive all the time every 10 mins always checking the file arrival in dropbox/project/..../ folders

Any input and direction will be appreciated

Thanks,

------ Post updated at 07:08 PM ------

Correction in red

any files present in /data/abc/ if no then move all files present in dropbox/project/abc/
any files present in /data/pqr/ if no then move all files present in dropbox/project/pqr/
any files present in /data/lmn/ if no then move all files present in dropbox/project/lmn/
any files present in /data/xyz/ if no then move all files present in dropbox/project/xyz/

Welcome to the forum.

Any attempts / ideas / thoughts from your side?

Welcome TreasureCookies,
I have a few to questions pose in response first:-

  • Is this homework/assignment? There are specific forums for these.
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)

Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.

We're all here to learn and getting the relevant information will help us all.

Thanks, in advance,
Robin