View previous topic :: View next topic |
Author |
Message |
mcatmull@scripnet.com
Joined: 29 Oct 2009 Posts: 20
|
Posted: Wed Oct 06, 2010 6:29 am Post subject: Is there a way to check if a file is open |
|
|
I think we have an issue of when a file is open (i.e., still adding data to it) and then a scheduled chain task runs it attempts to act on the file in its unfinished state.
One of the tasks in the chain copies the file from the "staging" area' to the "load" area.
Is there a way to ensure the file is not open? |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Wed Oct 06, 2010 10:52 am Post subject: |
|
|
you can try the File/Directory properties task
1) canWrite variable.. may work if file is locked. some OS will still display this as true (i.e. can write) but incorrectly .. so test your situation.
2) ::ss or ::size variables. part of the timestamp or size. if the file timestamp or size is updated then you can test these variables every 5-10 seconds and compare values (use 2 variable monitor tasks). However, again like 1) above the OS may not update the timestamp or size dynamically, then you are out of luck. |
|
Back to top |
|
 |
|