infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
General
Tcl Event Programming
System
Originally posted by David Harrison
I need to capture a unix print file but I want to make sure the file has finished being written to. I
Find more posts tagged with
Clovertech
Comments
System
Originally posted by garry r fisher
Dave,
I assume that the date stamp on a print file will be the date/time it was originally written to disk until another application opens it. Once this happens then the modified date/time will change.
Not sure whether it would work but have you tried checking for an OPEN file? You could run a test on the file to see if it is locked or open for write by another application and only access it yourself once the 'print' process has completed.
Regards
Garry
System
Originally posted by David Harrison
Garry,
I'm on unix which unlike Windows doesn't have file locking. This is why I need to check over a period of time to see that it hasn't been updated. My question was about why the 'after' command didn't appear to execute.
Thanks,
Dave
John Mercogliano
David,
You need to have the after command on a line by itself. The way you are writing it, tcl thinks that you want that script to execute after 30000msec. The first form of after is what you want in this case which is after <msec>.
Try this:
set i 0
file stat $fname1 fstat1
while {$i<5} {
incr i
after 30000
file stat $fname1 fstat2
if {$fstat1(mtime) == $fstat2(mtime)} {
file copy $fname1 $fname2
break
} else {
file stat $fname1 fstat1
}
}
Cheers
System
Originally posted by David Harrison
John,
That worked; thanks very much for your help.
Regards,
Dave