SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Is a File Complete check

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Is a File Complete check
Author Message
Michael Tuszynski



Joined: 07 May 2004
Posts: 30

Post Is a File Complete check Reply with quote

I have a list of files that are pushed to one of my servers daily. I need to write
a check in JAL that verifies whether the file is 'complete' or not.

Is there any way of looking for file locks on a particular file, or is a iterative
file size compare the way to go?

-MPT

Thu Jun 10, 2004 11:11 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7955

Post Re: Is a File Complete check Reply with quote

Usually if you can open a file for reading it means it is not locked.

Here is an example script

Dim file_number
OnErrorGoTo LOCKED
FileOpen( "myfile.txt", "LineMode", "Read", "", file_number )
OnErrorResumeNext
FileClose( file_number )

// ok file is not locked
// ... put "if NOT locked" processing here ....
Exit

LOCKED:
OnErrorResumeNext
FileClose( file_number )
OnErrorStop
// ... put "if locked" processing here ....

: I have a list of files that are pushed to one of my servers daily. I need to
: write
: a check in JAL that verifies whether the file is 'complete' or not.

: Is there any way of looking for file locks on a particular file, or is a
: iterative
: file size compare the way to go?

: -MPT

Thu Jun 10, 2004 4:00 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 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
Design by Freestyle XL / Flowers Online.