User Tools

Site Tools


action:Write_to_a_File

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
action:Write_to_a_File [2016/05/06 06:32]
alain add internal and forum links
action:Write_to_a_File [2018/02/12 21:58]
peternlewis
Line 1: Line 1:
 The Write to a File and [[action:​Append Text to a File|Append Text to a File]] actions allow you to write a variety of things to a file on disk. The Write to a File and [[action:​Append Text to a File|Append Text to a File]] actions allow you to write a variety of things to a file on disk.
 +
 +**Warning: Ensure you specify a file path, not a path to a directory - this action uses an Apple API that can overwrite directories,​ destroying them completely.**
  
 Write or append the current system clipboard, a named clipboard, a variable, some text or some styled text (you can write but cannot append styled text). Write or append the current system clipboard, a named clipboard, a variable, some text or some styled text (you can write but cannot append styled text).
Line 12: Line 14:
  
 Note the difference between the Write and Append actions: ​ Write changes the entire contents of the file on disk while Append adds the new content at the end of the file. Note the difference between the Write and Append actions: ​ Write changes the entire contents of the file on disk while Append adds the new content at the end of the file.
 +
 +For text, the action allows you to control what text processing happens in the gear menu (7.2+) :
 +
 +* Process Text Normally (process text tokens and backslash characters)
 +* Process Text Tokens Only (process text tokens but not backslash characters)
 +* Process Nothing (process neither text tokens nor backslash characters)
 +
 +Most other [Text Fields](https://​wiki.keyboardmaestro.com/​Text_Fields) in Keyboard Maestro process both text tokens and (except for regular expression fields) backslash characters. ​
  
 ===== See Also ===== ===== See Also =====
Line 35: Line 45:
 - [[https://​forum.keyboardmaestro.com/​t/​can-i-trigger-a-macro-if-an-image-made-by-screenshot-utility-was-added-to-clipboard/​3612/​2|Can I trigger a macro if an image made by screenshot utility was added to clipboard?​]] - [[https://​forum.keyboardmaestro.com/​t/​can-i-trigger-a-macro-if-an-image-made-by-screenshot-utility-was-added-to-clipboard/​3612/​2|Can I trigger a macro if an image made by screenshot utility was added to clipboard?​]]
  
-- [[https://www.google.fr/search?q=site:​forum.keyboardmaestro.com+Write+to+File|Keyboard Maestro Forum topics about Write to a File action]]+- [[https://forum.keyboardmaestro.com/​search?​q=Write%20File|Keyboard Maestro Forum topics about Write to a File action]]
action/Write_to_a_File.txt ยท Last modified: 2023/05/15 00:22 by peternlewis