I am just going thru one of our sites ( locally ) nigh on a gig of files, and need to do a find and replace. But we have gazillions of folders etc.
Whats your recommendations on doing this ?
I am working locally.
Depends what you want to do?
I presume you want to replace files. In that case you will need to recursively search each folder to find said file and then replace it with whatever you want.
Now windoze has very rudimentary scripting functions. For example, you can go to the console and type stuff like del *.txt which would delete all text files in your directory.
With a little ingenuity you could write a little batch file to recurse through directories and do something practical.
Of course, windoze lacks the fully scripting power of linux but meh…
Failing that I remember using winmerge, which is opensource. Now that was really useful for comparing directories and performing operations…
Not sure if that would be of any use to you…http://winmerge.org/about/screenshots/
Of course if it was me I would just get out my g++ compiler and write win32 app to recurse directories to do what I want. Or even a dotnet app would do the trick.
I need to change specific text and code within files.
So like : find foo.png > replace with koff.png etc etc
^^ Hmm in that case, I’m not sure if winmerge fits the bill.
Sorry I can’t help you there because I’m working on my linux box at the mo.
The only other thing which could trip you up is the file format. Obviously proprietry stuf such as word docs you’re gonna run into big issues.
I am assuming these are plain text files we’re on about or .php files from you’re given history on these forums. In which case writing a simple batch file is going to be the easier option.
Let me see…
Perhaps TextCrawler is what you are looking for? (Google it, I am not sure about the forum rules on links)
Be sure to make a backup of your files before running any software like this.
^^ Not checked it but the above poster seems to have spotted a good freebie tool.
Looks like you need a dotnet and it should support rudimentary regex to boot.
Go for that.
Cheers I had looked at that … but dismissed it lol,no idea why. Will look again. Cheers
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.