CalcIt Commands

FILESEARCH(FileVar, Pattern, Start=0, Size=rest of file)

Searches a sequence of bytes (pattern) in a file and returns an array containing all positions the pattern is found. The positions represent a byte index from the start of the file.

  • FileVar: File to search
  • Pattern: Pattern to search. It can be a single alphanumeric value or an array expression containing a number of numeric values in the range 0-255.
  • Start: Where the search starts in FileVar. Byte index from the start of the file. Optional. Zero if omitted.
  • Size: Number of bytes of FileVar  to be searched. Optional. If omitted the the rest of file after (and including) start is assumed.

It is used in array expressions.

See also Using File Variables, FileRecDef, FileDel, FileIns, FileToFile, READFile, ArrToFile, Size, FileRecs, FileAddFileCompare

Go Back