The FileCycleInfo object (IFileCycleInfo) is returned by the GetCycleInfo function of the ComScript FileObject.
Through this object, information about the file cycle specified in the GetCycleInfo function is available in the properties described below.
The file cycle information cannot be changed through these properties, all properties are read-only.
Properties
Name
Type
Description
CurrentCycleNumber
Integer
The current (highest) cycle number.
CurrentRange
Integer
The number of cycles that currently exist.
CycleNumbers
String
The existing cycle numbers as a comma-separated list, ordered from highest to lowest.
MaxRange
Integer
The configured cycle limit (set by @CYCLE,n) for this file.
Example
PowerShell
# See ComScript Connection Interface# ...$ComScr.Connect()#Create an object of the FileObject Interface to be able to handle files.$AmtFile=$ComScr.CreateFileObject()#Create an object of the FileInfo Interface to see information of that file.$AmtFileCycleInfo=$AmtFile.GetCycleInfo("D:\Files\Orders.dat",5)if($AmtFileCycleInfo-ne$null){$CurrentCycleNumber=$AmtFileCycleInfo.CurrentCycleNumber$CurrentRange=$AmtFileCycleInfo.CurrentRange$CycleNumbers=$AmtFileCycleInfo.CycleNumbers$MaxRange=$AmtFileCycleInfo.MaxRange}Else{$Msg.AddMsgInformation("Orders file cycle information was not found.")}# Finally release the variables and clean up the session.$ComScr.Dispose()