Re: DOCUMENT LIST : how do I know the documents are valid
Just an idea I set once on a project: check the size of the document. Until size is changing, consider that the copy/move is not finish and wait 1 second more. - Patrick EMANUEL Administrator www.association-qualisoft.eu (Soft1002, Simply Asso & QS_Toolbox) -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: DOCUMENT LIST : how do I know the documents are valid
try testing for a locked file. something like this: Repeat on err call ("If_File_Locked_Return_True") $Doc_Ref := Open document(New_Scan_Document_Path) on err call("") if (not(On_Err_call_File_Locked_Variable = true)) | ($Doc_Ref # † 00:00:00†) close document($Doc_Ref) File_Copy_Completed := move_file_Method end if until(On_Err_call_File_Locked_Variable = false) | (File_Copy_Completed = true) ** note code typed in email - use at your own peril :) Chip On Thu, 21 Nov 2019 10:20:46 +, Piotr Chabot Stadhouders via 4D_Tech wrote: > Hi, > > We use DOCUMENT LIST and COPY DOCUMENT to handle scans > The documents are copied by a scanner to a certain folder on a > Windows server, where we are picking them up and process them > It seems that because of slow copying the documents are picked up too > early by us > How can I ensure that the documents are totally copied by the > scanner? COPY DOCUMENT to an temporary folder doesn’t seem to solve > the problem > > Gr, > Piotr > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** We have done so much, with so little, for so long; We are now qualified to anything with nothing - unknown ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: DOCUMENT LIST : how do I know the documents are valid
Piotr, As alternative "hacky" solution you could try is to monitor the "modified at" at property and keep testing it every second or so until it's value no longer changes? There may be other possibilities too by inside using LEP but I'm not sure without further investigation. Regards, Narinder Chandi, ToolBox Systems Ltd. https://toolbox.systems I am available for new consulting opportunities… http://4d.1045681.n5.nabble.com/ANN-4D-Developer-Available-td5765443.html -- -Original Message- From: 4D_Tech <4d_tech-boun...@lists.4d.com> on behalf of 4D Tech Mailing List <4d_tech@lists.4d.com> Reply-To: 4D Tech Mailing List <4d_tech@lists.4d.com> Date: Thursday, 21 November 2019 at 15:03 To: 4D Tech Mailing List <4d_tech@lists.4d.com> Cc: Piotr Chabot Stadhouders Subject: Re: DOCUMENT LIST : how do I know the documents are valid Dear Alexander, Unfortunately, I believe the “locked” attribute doesn’t return true when copying is in progress But thanks for your tip. Gr, Piotr could this help? GET DOCUMENT PROPERTIES ( document ; locked ; invisible ; created on ; created at ; modified on ; modified at ) > Am 21.11.2019 um 11:20 schrieb Piotr Chabot Stadhouders via 4D_Tech <4d_t...@xxx.xxx>: > > Hi, > > We use DOCUMENT LIST and COPY DOCUMENT to handle scans > The documents are copied by a scanner to a certain folder on a Windows server, where we are picking them up and process them > It seems that because of slow copying the documents are picked up too early by us > How can I ensure that the documents are totally copied by the scanner? COPY DOCUMENT to an temporary folder doesn’t seem to solve the problem ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: DOCUMENT LIST : how do I know the documents are valid
Dear Alexander, Unfortunately, I believe the “locked” attribute doesn’t return true when copying is in progress But thanks for your tip. Gr, Piotr could this help? GET DOCUMENT PROPERTIES ( document ; locked ; invisible ; created on ; created at ; modified on ; modified at ) > Am 21.11.2019 um 11:20 schrieb Piotr Chabot Stadhouders via 4D_Tech > <4d_t...@xxx.xxx>: > > Hi, > > We use DOCUMENT LIST and COPY DOCUMENT to handle scans > The documents are copied by a scanner to a certain folder on a Windows > server, where we are picking them up and process them > It seems that because of slow copying the documents are picked up too early > by us > How can I ensure that the documents are totally copied by the scanner? COPY > DOCUMENT to an temporary folder doesn’t seem to solve the problem ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: DOCUMENT LIST : how do I know the documents are valid
could this help? GET DOCUMENT PROPERTIES ( document ; locked ; invisible ; created on ; created at ; modified on ; modified at ) > Am 21.11.2019 um 11:20 schrieb Piotr Chabot Stadhouders via 4D_Tech > <4d_tech@lists.4d.com>: > > Hi, > > We use DOCUMENT LIST and COPY DOCUMENT to handle scans > The documents are copied by a scanner to a certain folder on a Windows > server, where we are picking them up and process them > It seems that because of slow copying the documents are picked up too early > by us > How can I ensure that the documents are totally copied by the scanner? COPY > DOCUMENT to an temporary folder doesn’t seem to solve the problem > > Gr, > Piotr > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
DOCUMENT LIST : how do I know the documents are valid
Hi, We use DOCUMENT LIST and COPY DOCUMENT to handle scans The documents are copied by a scanner to a certain folder on a Windows server, where we are picking them up and process them It seems that because of slow copying the documents are picked up too early by us How can I ensure that the documents are totally copied by the scanner? COPY DOCUMENT to an temporary folder doesn’t seem to solve the problem Gr, Piotr ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **