I have a JS script which attempts to copy CCTV files from one SMB location to another. All files are created in the same way are in essence the same. I am using globto get a list of all files.
90% of files copy just fine, however randomly some fail to copy. I am using
fs.readFileSync(filesArr[i]);
Which results in
Note I am showing the source file location and the destination at the top.
When I then use Files in Ubuntu I can see each file and open it!
I can not understand is why it works most of the time.