Hello,
I have a project for scanning documents using CSentry, and I’m facing the following issue:
I don't want to synchronize photos that have already been sent.
I used the following script:
PROC SYNC1
if syncconnect(dropbox) and $="1" then
syncfile(PUT,pathname(csentry)+"/*.jpg","/SCAN CIN");
endif;
Any suggestions or solutions would be greatly appreciated. Thanks in advance!
Preventing Duplicate Photo Synchronization in CSentry Document Scanning Project
Re: Preventing Duplicate Photo Synchronization in CSentry Document Scanning Project
One option is to move the images that have been synced to an archive folder. https://www.csprousers.org/help/CSPro/f ... ction.html
The other option is to use binary dictionary items introduced in CSPro 8.0. When using binary dictionary items, content associated to it are part of the case and are not resynced again if they are not changed.
https://www.csprousers.org/help/CSPro/b ... items.html
The other option is to use binary dictionary items introduced in CSPro 8.0. When using binary dictionary items, content associated to it are part of the case and are not resynced again if they are not changed.
https://www.csprousers.org/help/CSPro/b ... items.html
-
- Posts: 143
- Joined: February 11th, 2013, 8:26 am
Re: Preventing Duplicate Photo Synchronization in CSentry Document Scanning Project
Hello,
Maybe I am wring, but as I know, if you syncronize to a csweb server, the transmission is smart, if the file you are transiting it was transmitted before and it has no changes from the previous transmission, it is not transmitted again, however the result code is like it was transmitted correctly. It means it transmits only the new files or modified files, then you don't need to have a logic to decide what to transmit and what no.
Thanks
Mario
Maybe I am wring, but as I know, if you syncronize to a csweb server, the transmission is smart, if the file you are transiting it was transmitted before and it has no changes from the previous transmission, it is not transmitted again, however the result code is like it was transmitted correctly. It means it transmits only the new files or modified files, then you don't need to have a logic to decide what to transmit and what no.
Thanks
Mario
Re: Preventing Duplicate Photo Synchronization in CSentry Document Scanning Project
Hi you can Try the code below :
if ! syncconnect(csweb, host_file,user, pass_file) then
errmsg("Error connection");
reenter;
endif;
list string files_to_sync;
numeric last_sync_time = tonumber(loadsetting("last_sync_time", "0"));
dirlist(files_to_sync, PathData+"photos", filter := "*.png", recursive := true);
do numeric ctr = 1 while ctr <= files_to_sync.length()
if filetime(files_to_sync(ctr)) < last_sync_time then
next;
endif;
if ! syncfile(PUT,files_to_sync(ctr), "/myFolder/") then
errmsg("Not send");
syncdisconnect();
reenter;
endif;
enddo;
syncdisconnect();
errmsg("Success");
errmsg("Error connection");
reenter;
endif;
list string files_to_sync;
numeric last_sync_time = tonumber(loadsetting("last_sync_time", "0"));
dirlist(files_to_sync, PathData+"photos", filter := "*.png", recursive := true);
do numeric ctr = 1 while ctr <= files_to_sync.length()
if filetime(files_to_sync(ctr)) < last_sync_time then
next;
endif;
if ! syncfile(PUT,files_to_sync(ctr), "/myFolder/") then
errmsg("Not send");
syncdisconnect();
reenter;
endif;
enddo;
syncdisconnect();
errmsg("Success");
Oumar DIOP from Sénégal.