Shell Commands/FileWrite
From MorphOS Library
FileWrite - Writes data to a file
File/A, Size/N/A, Data/N, String, Add/S
File - Filename to write data to Size - Amount of data in bytes to be written Data - Data to be written in hex String - Data in the string format Add - Adds data to an existing file instead of creating a new file
If the length of data is shorter than the size value, the file is filled by repeating the data contents. Strings get separated by null bytes then. Data entered in decimals gets converted to hex. If no data is given, the file is filled with null bytes.
Examples:
Ram Disk:> FileWrite test 8 0x4d4f5321 Ram Disk:> Type test HEX 0000: 4D4F5321 4D4F5321 MOS!MOS! Ram Disk:> FileWrite test 32 STRING MorphOS Ram Disk:> Type test HEX 0000: 4D6F7270 684F5300 4D6F7270 684F5300 MorphOS.MorphOS. 0010: 4D6F7270 684F5300 4D6F7270 684F5300 MorphOS.MorphOS. Ram Disk:> FileWrite test 4 STRING MorphOS Ram Disk:> Type test HEX 0000: 4D6F7270 Morp Ram Disk:> FileWrite test 4 STRING MorphOS ADD Ram Disk:> Type test HEX 0000: 4D6F7270 4D6F7270 MorpMorp