I am currently running a sync script to copy everything from a remote folder to my local folder. This is working fine, but I'm currently running into the issue of the sync job taking a long time. The remote folder is growing weekly, so the process is taking longer every time new files are created.
I haven't been able to successfully use the timestamp option to only sync new files because the remote folder has new folders created, but the underlying files in the folder are often timestamped older, which causes these files not to be copied over. The folder itself has a new timestamp, but the underlying files do not.
So my question: is there a way to check just the directories under a specified directory, and if the subdirectory itself is newer, then copy the entire subdirectory from the remote to the local?
I attached the current sync script.