User Tools

Site Tools


Write text to a file


NameRequiredMultiple ValuesDescription
TOyesnoThe full file path
TEXTyesnoThe line of text to write
MODEyesnonew or append


IF 1 == 1 THEN write TEXT 'textline' TO /home/pi/myfile.txt MODE new => deletes file if it exists and creates new file
IF 1 == 1 THEN write TEXT 'textline' TO /home/pi/myfile.txt MODE append => opens existing file or creates new file if it doesn't exist and appends text to the end of it

IMPORTANT: Be careful when using this action if your filesystem is on an SD card! Very frequently writing files to your SD-card will shorten its lifetime. If you intend to write files very often it is better to use an external (USB) device like an usb-stick, or -harddisk.

docu_write.txt · Last modified: 2018/08/08 12:41 by Niek