|   |   | 
| file.write Writes a character data string to a file | ||||
| Usage | ||||
| file.write [-a] [-l] <filename:string> <data:string> | ||||
| Description | ||||
| Writes <data> (which is a string of characters) to the file <filename>. It does not append a trailing LF character: if you want it you must explicitly specify it in the <data> parameter. -a causes the command to append the <data> to the file instead of overwriting the entire file. The path is adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it should be automatically guaranteed - just use a UNIX style path. The file is saved in UTF-8 unless the -l switch is specified (in that case the local 8-bit encoding is used). Please note that UTF-8 is the only character set that preserves ALL the possible characters with the exception of the null terminator. If you want to write binary data, take a look at file.writebytes instead. | ||||
| Switches | ||||
| 
 | ||||
| See also | ||||
| file.rename, $file.exists |