From WikiChip
/fseek Command - mIRC
< mirc‎ | commands
Revision as of 14:14, 20 October 2018 by Sophist (talk | contribs)

The /fseek command sets the read/write pointer to the specified position in the file, position starts at 0.

Synopsis

/fseek -nlwr <name> <position|N|matchtext>

Switches

  • -l - sets the pointer to the beginning of the Nth line
  • -n - sets the pointer to the beginning of the next line (from the current position of the read/write pointer)
  • -w - sets the pointer to the beginning of the line matching the wildcard expression
  • -r - sets the pointer to the beginning of the line matching the regular expression

Parameters

  • <name> - the name of the file handle
  • <position|N|matchtex> - not required if you use -n, if -l is used: a line number, if -w is used: a wildcard expression, if -r is used: a regular expression, if no switch is used, it's the position in the file (Nth byte)


Note: if /fseek is not successful (can't find a match with -w or -r, can't find the Nth line with -l etc), it will set the read/write pointer to the end of the file. $fopen().err is not set.

Example

/fseek myfile 42
/fseek -l myfile 12
/fseek -n
/fseek -w *findthis*
/fseek -r /findthat/

Compatibility

Added: 6.1

See also

[Expand]
v · d · e mIRC commands list