Forum Moderators: open
What I want to be able to do is to edit lines in folder's files (sub-directories included). I've tried following editors and nothing seems to work:
TextPad
UltraEdit
EditPad Pro
TextWiz
Crimson Editor
AceHTML
NVU
Frontpage 2002
This is an example of what seems to be an impossible task:
<a href="http://www.webmasterworld.com/">WB WORLD</a><br>
<a href="http://www.webmasterworld.com/home.htm">WB WORLD FORUMS</a>
That would be in my navigation. Now, if I want to replace that with two different URLs at the same time, delete or replace with one or more lines at the same time - this seems to be impossible?
I'm not even able to paste two lines to the "find" field in most of those editors, but even if I would be able, it still only searches the first line.
Any help appreciated!
You might want to read up on Regular Expressions however, if you want to do complex search and replaces that's where it's at and you souldn't have any problems finding a text editor that supports them.
[edited by: The_Contractor at 4:53 pm (utc) on Jan. 13, 2008]
with
<a href="lotsofwidget1.html" >Widget 1</a> <br> <br>
<a href="widget2.html" >Widget 2</a> <br> <br>
<a href="lotsofwidget3.html" >Widget 3</a> <br> <br>
<a href="widget4.html" >Widget 4 </a> <br> <br>
or anything else
singe command across full site html files or whatever
very quick very efficient but also powerful enough to be dangerous so be careful until confident with
steve
<a href="widget1.html" >Widget 1</a> <br> <br>
<a href="widget2.html" >Widget 2</a> <br> <br>
<a href="widget3.html" >Widget 3</a> <br> <br>
<a href="widget4.html" >Widget 4 </a> <br> <br>with
<a href="lotsofwidget1.html" >Widget 1</a> <br> <br>
<a href="widget2.html" >Widget 2</a> <br> <br>
<a href="lotsofwidget3.html" >Widget 3</a> <br> <br>
<a href="widget4.html" >Widget 4 </a> <br> <br>
Well yes Search and Replace can do that...heh..heh
You can do case-sensitive and/or regular expressions on both the search strings as well as the filenames.
Lastly, you can do a find/replace without interactive intervention, or you can edit files one-by-one.
There is also a restore from local history feature that comes in handy once in awhile.
will AFR be able to search/replace one line of code for a multi-lined code? example below:
replace this: <!--siteid="123"; sitename...one-lined string...//-->
with this:
<script type="text/javascript">
<!--
naa_siteid="12345678"; naa_sitename="example.com"; naa_test="no";
//-->
</script>
<script type="text/javascript" src="http://aa.somedomainname.com/naa_1x1.js"></script>
in order for code to work it cannot be on a one lined string.
" <!-- " AND " //--> " have to be on their own line.
thanx,
alx
[edited by: tedster at 8:06 pm (utc) on Jan. 20, 2008]
[edit reason] use example.com [/edit]
Yes works as per your needs , I always have confirm replace turned on and run the first 2 as manual to check it gives the result I want then if all ok say yes to replace all
The only issue I have is THERE IS NO UNDO changes so in the beginning I tend to back up site prior to mass changes
It is worth noting the only problem I have ever had is application freezing when I used on a 20,000 page site due to memory leakage , but of all the apps I have purchased over the years I would say AFR has been one of the big time savers
steve
It did not freeze up every time and on one site with 40K pages was fine , but thought you should know about the bug incase you come across it.
It is quite easy to work out where it hangs I just hit alt ctr del to end process and by checking on time file changed just a bit of a pain plus can just use find
but 40k of files just couple of seconds to afr so saves hours
of all the stuff I use my diamonds are AFR and Zenu
hope that helps
steve
hey steve,
i got afr but in need of advice. problem was i couldn't get my script to replace as is (as in, multiple line) so i contacted afr's roman. he told me to uncheck (at "replace" options) "delete trailing CRLFs" for it to work.
when i do that afr ceases to work. (doesn't recognize file) when i re-check "delete trailing..." afr works, although script shows as one continuous line. tried to private message roman again but must be busy.
i'm thinking i should have something check marked or not check marked but don't know what. right now, the only thing i changed from default was i unchecked "replace in MS Office" and checkmarked "save as unix files"
(also checkmarked "confirm before action...)
also, i don't know which is better to use (when it does work) replace, replace with OR replace, insert before/after
any thoughts,
alx