How it works
- Choose the file, the text and the mode: replace, or create only when missing.
- The folder is created if needed, and text is saved as UTF-8.
- The new contents appear only once fully written, so other apps never see half a file.
- A brand-new file is recorded so Undo file moves can remove it; replaced contents aren't brought back.
Routines that use it
Daily note from a template
Each morning, create a note named with today's date only if it doesn't exist, then open it with Open file or folder.
Save what's playing
Get now playing, then write the track title to a text file that a stream overlay displays.
Keep the clipboard
On a Hotkey, write the result of Get clipboard into a scratch file.
Settings
| Setting | What it does |
|---|---|
| Path | The text file. |
| Text | What to write. |
| Mode | Replace the file, or write only when it doesn't exist yet. |
Good to know
- Undo file moves doesn't restore what a file held before it was replaced.
Questions
- How do I create a text file without overwriting an existing one?
- Set Write text file to "write only when it doesn't exist yet". If the file is already there, it is left untouched.
- What's the difference between Write text file and Add text to file?
- Write text file replaces the contents, while Add text to file adds to the end. Pick Add text to file for logs.