May-31-2021, 04:37 AM
Hello I am trying to clone a directory with text files (XML, L5X, txt, etc). I would like to build something that would reference a .CSV with what text I would like to search for in column A and what I would like to replace that text with in column B. I would like my code to then copy all the text files in that folder and use the excel spreadsheet to make all the search and replacements of the file directory all in one pass instead of search and replace each file individually.
How would I go about doing this? What python methods are out there that would help with this? There's some material online that shows how to make changes to a single string of text but not much on mass search and replace referencing the csv/spreadsheet.
Any suggestions or reference code to do this to put me on the right track would be greatly appreciated!
Thank you
How would I go about doing this? What python methods are out there that would help with this? There's some material online that shows how to make changes to a single string of text but not much on mass search and replace referencing the csv/spreadsheet.
Any suggestions or reference code to do this to put me on the right track would be greatly appreciated!
Thank you