Windows appends to text

One of the oldest and used often enough to not even blink an eye when you think about features of Linux is the append to text file feature. You can append pretty much any text to the end of a a text file without opening the file. With this fancy little script, Windows begins to start acting more like a real operating system:

  1. Create a C:\scratch\ directory on your computer.
  2. Right click this script and save it to that directory.
  3. Right-click on the newly-saved SFS.VBS file and choose Create Shortcut. Rename the shortcut something you’ll remember and use, like “add.”
  4. In Control Panel, double-click System. In the Advanced tab, click on Environment Variables. Under System Variables, choose PATH and Edit. Add c:\scratch\ to the end of your existing path.
  5. Now, to add text to a file named c:\scratch\scratch.txt, hit Windows-R, type “add” and Enter. Then a popup will prompt you for what text to save to the file.
    Type in your text and hit Enter, and a c:\scratch\scratch.txt file will get updated with the new text and the date and time.

UPDATE(7/22): ratchet informs me that you can do redirection of text in a CLI on Windows. Agreed, but most people don’t open Windows shell. If you do however, the easiest way to do this is by doing the following:
  • echo “THIS IS A TEST” >> c:\mynewfile.txt
where “THIS IS A TEST” is replaced with whatever text you want and the path behind the redirection symbol is the path of the file you wish to append the text.

LifeHacker
< SlackerManager