first you want to think about some considerations such as
- if you have 00000, do you want it to replace with 00800 or 00008?
then, you can think about whether you want to write a python script to process the text files, or if you want to use some builtin commandline tools, (or maybe even search and replace from our text editor!)
Here is potentially one command to do something like what you described.
sed s/000/008/g blablabla9999_WD000txt > blablabla9999_WD008txt
Experiment with different scripts/commands (but make sure you make a backup of your data first in case you irreversibly delete anything)
man sed
from the bash commandline will give you a good overview. Otherwise tr
, awk
etc can all fulfill similar functions. From within python, you may want to look at the regex module and string replacements.