Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   Wait until file is unused (https://www.kinook.com/Forum/showthread.php?t=2306)

wellilein 02-22-2007 07:46 AM

Wait until file is unused
 
I am building PDF documentation using PDFCreator. Currently I have a "Wait until file exists" before I rename the PDF file. Unfortunately the file will first be created with 0 Bytes and it is in use so that it can't be renamed when the Wait action finishes.

Maybe the Wait action could have one more option for "Wait until file is unused".

It is also hard for me to determine the process ID of PDFCreator, because that's not the process I start to build the PDF (that's Winword.exe in my case). Therefore I would need to wait until the process PDFCreator.exe is created by Winword, then get the process ID and then wait until PDFCreator process exits.

kinook 02-22-2007 12:37 PM

Can't you launch Word and/or PDFCreator in such a way that it won't return/exit until it has finished? Otherwise,

1) As you mentioned, you could wait until the PDFCreator process exists, then wait until it goes away (using vbld_AppIsRunning in a Run Script step).
2) Try to rename or open the file (which should fail if PDFCreator is still writing it) until it succeeds.


All times are GMT -5. The time now is 01:21 PM.


Copyright © 1999-2023 Kinook Software, Inc.