I would like a simple script in .bat, .vbs, or powershell, which will look into a .txt fle and do one of the following, whichever is easier to do:
1. Whenever it sees specific text such as AD, or DE, or BOG, or STOW.. that it will insert a tilde character (~) just before the text and then save the file with a new name.
OR
2. Whenever it sees the specific text such as AD, DE, BOG, or STOW, that it would start a new line which starts with those characters, and only start another line when it finds the next set of specific text.
The file resides at:
C:\Users\user\Desktop\folder\file.txt
And the output should be in the same folder but renamed to:
C:\Users\user\Desktop\folder\fileR.txt
Open in new window