hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there a way to check if a file is open

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
mcatmull@scripnet.com



Joined: 29 Oct 2009
Posts: 20

PostPosted: Wed Oct 06, 2010 6:29 am    Post subject: Is there a way to check if a file is open Reply with quote

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
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Oct 06, 2010 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group