I have several large txt files the following examples:
data="32/3"
count id="3" data="0.0237/4"
ext min="1" max="3" data="28.69*2"
My goal is to search for all the math operations and replace them with its results, like this:
data="10.666667"
count id="3" data="0.005925"
ext min="1" max="3" data="57.38"
Is there any way to automate this in Notepad++?
Best Answer
You can automate that in Notepad++ by creating shortcut to external VBScript. Here is the script:
Do the following:
"C:\Test\MathResults.vbs" "$(FULL_CURRENT_PATH)"
including quotes into The Program to Run fieldNow your shortcut has been saved in configuration file, you can just open text files, press Ctrl + F7, once the script completes processing, reload dialog appears, click Yes to display changed file (you may setup the file to be reloaded automatically after been changed). That's it.
BTW, this script works standalone perfectly, you can select in explorer window or on desktop number of files and folders to be processed, and then drop it to the script file.