From WikiChip
Difference between revisions of "mirc/commands/bwrite"
m (bot: correcting title) |
|||
Line 1: | Line 1: | ||
{{mirc title|/bwrite Command}}{{mIRC menu}} | {{mirc title|/bwrite Command}}{{mIRC menu}} | ||
The '''/bwrite command''' can be used to write a specified amount of bytes from the string/buffer to a given file starting at the start_pos position. | The '''/bwrite command''' can be used to write a specified amount of bytes from the string/buffer to a given file starting at the start_pos position. | ||
+ | |||
+ | '''Note''': the starting position is 0, not 1. | ||
== Synopsis == | == Synopsis == | ||
Line 11: | Line 13: | ||
== Parameters == | == Parameters == | ||
* '''<filename>''' - the file name to be modified | * '''<filename>''' - the file name to be modified | ||
− | * '''<start_pos>''' - the position in the file to start writing at | + | * '''<start_pos>''' - the position in the file to start writing at, starts a 0 |
* '''[length]''' - Length of the data to be written | * '''[length]''' - Length of the data to be written | ||
* '''<text|%var|&binvar>''' - data to be written to the file | * '''<text|%var|&binvar>''' - data to be written to the file |
Revision as of 00:12, 24 February 2015
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
Template:mIRC menu The /bwrite command can be used to write a specified amount of bytes from the string/buffer to a given file starting at the start_pos position.
Note: the starting position is 0, not 1.
Synopsis
/bwrite <filename> <start_pos> [length] <text|%var|&binvar> /bwrite -t <filename> <start_pos> [length] <text|%var>
Switches
- -t - Treats everything as plain text (i.e. binary variables are not evaluated)
Parameters
- <filename> - the file name to be modified
- <start_pos> - the position in the file to start writing at, starts a 0
- [length] - Length of the data to be written
- <text|%var|&binvar> - data to be written to the file
Example
;Write some text to a file at beginning of the file /bwrite file.txt 0 hello there! ;Replace "there!" with "world!" /bwrite file.txt 6 world!
Compatibility
Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC commands list