Page 1 of 1

Identify if the file is being copied

Posted: Wed Aug 30, 2017 3:48 pm
by vsurapaneni
Hi,

We have a setup where BestSync is used for transferring files from one network to another network over LAN-LAN VPN and then the files are further processed at a certain frequency from the target folders.

Right now, we have an issue where the files are being processed from the target folder even before they are copied to that location completely causing incomplete files.

Few years back, when we had a similar issue with BestSync we created a rule in our app to ignore files starting with _BS since we thought the temp files created by BestSync started with that naming convention. And that resolved the issue for us until we started using the latest version of BestSync and in this version it doesn't seem to create temp files in that naming convention.

Also to work around the issue, we checked the write option on the file in the target folder and it is returning true indicating that the file can be modified, so we assumed that the file copy is complete and so we can consider that file for processing. But even this resulted in incomplete files.

The Best Sync logs does not indicate any failures, so I think the files are copied correctly, it is just the further processing started before the files are copied completely.

Any ideas on how we can identify the files that are copied completely to avoid this issue.

Thanks in advamce.

Re: Identify if the file is being copied

Posted: Thu Aug 31, 2017 10:18 pm
by RiseFly
There is an option in BestSync for using the temporary file while transferring the file.
The option is "Use intermediate file during copy." in "Copy Options" tab.

The intermediate file is named like following rule:
_BS8_<Original File Name>.BS_.<Original Extension>

Re: Identify if the file is being copied

Posted: Fri Sep 01, 2017 9:25 am
by vsurapaneni
The temp naming convention is what we have used earlier. Does it work when we upload files to SFTP also ?

Re: Identify if the file is being copied

Posted: Sat Sep 02, 2017 7:10 am
by RiseFly
Yes, this method should work with uploading files to SFTP.