General Computer DiscussionYou should use this section to discuss software topics including Windows, Linux and various software applications, together with hardware related topics including buying a new machine, graphics cards, keyboards, etc.
Hello, im looking for a way to mass replace a value in lots of text files.
I use Maya for 3D animation and have created a fair few MEL scripts. I have about 30 different scripts that rely on getting various textures from my storage computer.
Now for reasons i wont go into it looks for the computer name which has now changed.
So do any of you know a way to mass change the values in a text file so i can change it from "StorageOrion" "Cluster01" as there are about 300 entries and i dont fancy copy and pasting it 300 times.
So i can set it to search for "StorageOrion" and replace it with "Cluster01" if worse comes to worse i can use replace all function in word but still a bit of a ball ache
You can open up all your text files at the same time then do a mass search and replace on all the open text files then do a save all as well. Its a great text editor
Its not an uncommon problem, id expect theres plenty of little programs that do exactly what you want. Remember to backup stuff first though incase it doesnt work 100% as expected.
its sad i used to know the unix command line for grep like the back of my hand,,, but cant remember it now, Ive got to these window things.
the visual c# ide i use which is free is awesome , just highlight a word , hit ctrl-h and type in the replacement and it replaces the word in the whole project, or all open files etc.
however i have to fire up crimson sometimes as it doesn't have a macro recorder, at least I haven't noticed one yet.
also with the ide it makes renaming a name a piece of pie, just edit the name were its defined, then a little thing like the paper clip comes along says do you want to rename it everywhere its used? it also doesn't just do it blindly if it would cause compile errors, although it will still let you if you insist.
Thanks for your help all. Did it using crimson editor as it was the 1st one i tryed and it worked. To Pura, i didnt use google as i didnt think it was a common problem at all so didnt think there would be many results, as well as trying to put what i wanted into terms google wouldnt give random results to. Im suprised theres so many programs to do it actually.
Thanks for your help all. Did it using crimson editor as it was the 1st one i tryed and it worked. To Pura, i didnt use google as i didnt think it was a common problem at all so didnt think there would be many results, as well as trying to put what i wanted into terms google wouldnt give random results to. Im suprised theres so many programs to do it actually.
Aye, i hope i didnt come accross as patronising with that. Most problems you could encounter someone else somewhere has at least asked the same question on a forum somewhere, its just a matter of using the right search terms. Google always impresses me.