Quote:

/write [-cida l# s# w#] <filename> [text]
Writes lines to a text file. For example:

/write store.txt This line will be appended to the end of file store.txt

The -c switch clears the file completely before writing to it, so it allows you to start with a clean slate.

/write -c c:\info.txt This file will be erased and have this line written to it

The -l# switch specifies the line number where the text is to be written.

/write -l5 c:\info.txt This line will overwrite the 5th line in the file

The -i switch indicates that the text should be inserted at the specified line instead of overwriting it. If you do not specify any text then a blank line is inserted. If you do not specify a line number then a blank line is added to the end of the file.

/write -il5 c:\info.txt This line will be inserted at the 5th line in the file

The -d switch deletes a line in the file. If you don't specify a line number then the last line in the file is deleted.

/write -dl5 c:\info.txt

The above command will delete the 5th line in the file.

The -s# switch scans a file for the line beginning with the specified text and performs the operation on that line.

/write -dstest c:\info.txt

This will scan file info.txt for a line beginning with the word "test" and if found, deletes it.

If you do not specify any switches then the text is just added to the end of the file.

The -w# switch scans a file for the line containing the specified wildcard text and performs the operation on that line.

Note: With both -s# and -w# you can enclose the scan text in quotes if it contains spaces.

The -a switch indicates that mIRC should append the line of text you specified to the existing text of the specified line.

Note: You cannot use this command to write to an INI file. If you do so, you will most likely corrupt the INI file.



That's the /write extract from the help files for mIRC 6.0.3

Last edited by neophyte; 23/04/03 12:25 PM.