I have a .txt file saved on my computer. This is the location of the file:
/Users/Me/Desktop/My Documents/My Fruit Log.txt
I want my AppleScript-based Automator application to delete a specific line of the .txt file.
The contents of the .txt file looks like this:
set lineNumberToErase to 8
The resulting .txt file should be:
Notice how not only the text on that line is removed, but the entire line is gone as well.
Bonus points if the solution includes some sort of mechanism to ensure that not more than 1 line is removed from the file. My fear when automating deletions like this is that the script somehow erases the entire file (based on me making a small mistake somewhere).