Cloud folders issue

I wrote a script that moves items between cloud folders. The movement is based on the item´s name.
What happens is that sometimes the error -10.000 raises. Sometimes.
In particular, the scripts runs inside the Dropbox folder.
The script does this:

  1. Uses Finder to get the item in a folder (inside Dropbox folder) whose modification date is older. -> No problem.
  2. Once located the item and based on its name, it´s moved to another folder (inside Dropbox folder) -> Sometimes Err -10000

Has anybody had the same problem before?
Are “cloud folders” (iCloud Drive, Box or Dropbox)…Finder folders, or not?
May the sync service cause Err -10.000?
How could I workaround this?
Thanks in advance.