View Full Version : Mass Search/Replace
jlp09550
09-30-2007, 02:38 PM
I've been looking all over for a tutorial or something to do this.
I need to know how I can search through all files in a folder (and sub folders too!) for a specific text/variable and replace the text found with a new text.
Got that? Anyone can help? Or do you guys need more clarification?
Thanks! =D
OwlManAtt
09-30-2007, 02:51 PM
Sed (http://www.grymoire.com/Unix/Sed.html).
Sed for Win32 (http://gnuwin32.sourceforge.net/packages/sed.htm)
jlp09550
09-30-2007, 02:54 PM
Sed (http://www.grymoire.com/Unix/Sed.html).
Sed for Win32 (http://gnuwin32.sourceforge.net/packages/sed.htm)
No, thanks. Tried it and didn't like it.
FuRom
09-30-2007, 05:43 PM
"Actual Search and Replace"...... it's an awesome program. I can't remember if it is a paid program or not, I've had it for like forever.
jlp09550
09-30-2007, 07:58 PM
"Actual Search and Replace"...... it's an awesome program. I can't remember if it is a paid program or not, I've had it for like forever.
It's shareware and all it does is make more lines within the script.
FuRom
09-30-2007, 11:07 PM
It's shareware and all it does is make more lines within the script.
I beg to differ. It can search entire folders for any text and replace the text as well.
http://www.divlocsoft.com/ Sadly, it is a paid program. @_@
For example, you set the path to something like:
"C:\Documents and Settings\Gamma\Desktop\old"
Set the mask to:
"*.*" for any file or "*.php" to search php files only and such.
You have 3 tabs of crap you can do, I generally only use whats in the "Search and Replace" tab. It also supports multiple lines or text to be replaced.
jlp09550
09-30-2007, 11:26 PM
When I tried it, all that came out was, for example:
Original:
<?php
echo 'hi";
echo "hi, i'm third.";
?>
After Replacing:
<?php
echo 'hi";
echo "hi, i'm third.";
?>
FuRom
09-30-2007, 11:40 PM
odd, I've never had such a problem with it. Meh.
jlp09550
09-30-2007, 11:48 PM
odd, I've never had such a problem with it. Meh.
Unless it was BINARY upload that did that.. that was the only thing that edited the file.. or maybe it hates Vista..
FuRom
10-01-2007, 01:29 AM
Unless it was BINARY upload that did that.. that was the only thing that edited the file.. or maybe it hates Vista..
It might just hate vista. I never tested it on vista =/. I use windows xp home. I've used it on winxp pro, winME, and winNT.
Vivacity
10-01-2007, 10:05 AM
If you're running SVN, I think you can use regular expressions to make an edit to an entire folder's contents. I'm not too sure on that though, I've only done it like, once, a long, long, time ago.
Unless it was BINARY upload that did that.. that was the only thing that edited the file.. or maybe it hates Vista..
Use compatibility mode if the program doesn't run too well under Windows 6.
jlp09550
10-01-2007, 09:36 PM
Use compatibility mode if the program doesn't run too well under Windows 6.
Will do. I'll edit this post when I have any results.
*goes grab a copy from Demonoid*
EDIT: Still does same thing, adds extra lines, even in Windows XP.
Will do.
EDIT: Still does same thing, adds extra lines, even in Windows XP.
You'd think you would own a machine that has XP on it. -shrug- No tutorials?
FuRom
10-03-2007, 10:04 AM
Alright, I'mma just upload a video of me using it... maybe this will be helpful......
http://youtube.com/watch?v=M62FWyvZ55A
This will tell ya if you're just using it wrong.
This isn't to say you're not using it right, I've just known a few people that didn't pay attention to details.
jlp09550
10-03-2007, 08:43 PM
That's what I did, but I only choose to not have any backups made in the options.
Yet, it still comes with lines when finished when them, uploading either way.
But, this isn't really for debugging it.. but are there any other programs to suggest?
FuRom
10-05-2007, 02:32 AM
Well, you can always search through download.com (http://www.download.com). A lot of people never do this for some reason. I always seem to find something remotely related to what I want or need.
Well, you can always search through download.com (http://www.download.com). A lot of people never do this for some reason. I always seem to find something remotely related to what I want or need.
Download.com is sometimes not up to date sometimes, especially programs like Avast! that its code changes on a monthly basis. Just my two cents.
jlp09550
10-05-2007, 10:33 PM
Download.com is sometimes not up to date sometimes, especially programs like Avast! that its code changes on a monthly basis. Just my two cents.
That's why I don't go there.. but it's the best-of-the-best rather than searching using Google. :P
That's why I don't go there.. but it's the best-of-the-best rather than searching using Google. :P
Programs I need I usually don't find on Download.com anyhow, but that's not the point of this topic.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.