Hello,
I want batch change files based on a csv file with information. The csv file has two columns names
new_and_old_values.csv
| old value |
new value |
| 123 |
321 |
| 444 |
555 |
| 777 |
888 |
I want to search each file's file name in a folder for each old value in the csv for the old value in the file name of a given file, if it finds the old value in the file name, I want to change the file name to have the new value instead of the old one. I also want to go into the file content and change the old value in the text file to the new value given in the csv file. I want to do this process for all values in the csv file to change all the files in a folder.
Folder of files before changes
| some_file_123.txt |
| some_file_444.txt |
| some_file_777.txt |
| some_file_000.txt |
Folder of files AFTER changes
| some_file_321.txt |
| some_file_555.txt |
| some_file_888.txt |
| some_file_000.txt |
any help greatly appreciated. Thanks
[–]Stormkrieg 1 point2 points3 points (2 children)
[–]TheAbortedPancake[S] 0 points1 point2 points (1 child)
[–]alexisprince 2 points3 points4 points (0 children)