Posted: Thu Aug 11, 2005 4:07 pm Post subject: GLOBAL REPLACE - new feature
Hi,
Leo thought that "Global replace" is a must for V+ and I couldn't but listen to him
We quickly agreed that its natural place is within "Find+" searching tool. So, this is how I see it:
It will be placed on the second page, below "Search for string" and "Case sensitive" items.
First goes "Global replace" checkbox. If checked, below you see "Replace with" edit box, otherwise it's dimmed.
How it works:
All Find+ search parameters will be applied (incl. Wildcards etc...).
Searched strings will be automatically replaced in all files that meet search criteria.
All found (processed) files will be given in the listbox at the end, as usual, where you can check that all is done properly (via "Find in list" command).
A nice thing from Hex search&replace could be implemented too, if you agree, and that is the ability to replace shorter with longer strings and the opposite, shortening the files if needed or increasing them (w/o overwriting anything). Of course, this feature should not be applied on, let say, OPL files - you better use Hex module for that adventures
I am aware that this is a pretty dangerous tool and it should definitely be used with extreme caution.
I don't need to say that it is extremely fast - on the level of search function itself
Ideas&suggestions are welcomed and, of course, volunteers for beta testing
One little problem.
Obviously, two suggested "Global replace" features are incompatible
You have to choose between using wildcards and the ability to replace shorter with longer strings and the opposite.
Or you insist on both
Anyway, there could be an option to control the whole process of replacing strings or to do it automatically.
In first case a dialog can be raised for every file/offset about to be processed. Dialog options are: "Skip file" (even if some replaces in file already done), "Skip offset" and "Replace".
Additionally, found string could be shown in a context, so you see what is about to be replaced.
I read the whole post a few times but still don't know what the feature really does...
Is it right, that it replaces files as e.g. Capture1.mbm, Capture2.mbm and so on to e.g. Picture1.mbm, Picture2.mbm when you use the wildcard Capture* to Picture* ? If yes, it would be a very useful tool, as Leo says Edit: Now got it. It replaces strings IN files (this will take some time to think about it
Let me know if I might be a beta tester, too (I'm going to vacances next Friday)
Greets, Jonas
Posted: Fri Aug 12, 2005 11:07 am Post subject: Re: GLOBAL REPLACE - new feature
Edo wrote:
Hi,
Searched strings will be automatically replaced in all files that meet search criteria.
All found (processed) files will be given in the listbox at the end, as usual, where you can check that all is done properly (via "Find in list" command).
Hm...
I think that a choice between Replace Incremental/All (as in HexEditor) is a must...
Edo wrote:
Ideas&suggestions are welcomed and, of course, volunteers for beta testing
Do You need volunteers to use it immediately?
Here I am!
One little problem.
Obviously, two suggested "Global replace" features are incompatible
You have to choose between using wildcards and the ability to replace shorter with longer strings and the opposite.
Or you insist on both
Edo[/b]
Been a sober person I cannot insist on both, but to be honest - both are necessary!
Anyway, there could be an option to control the whole process of replacing strings or to do it automatically.
In first case a dialog can be raised for every file/offset about to be processed. Dialog options are: "Skip file" (even if some replaces in file already done), "Skip offset" and "Replace".
Additionally, found string could be shown in a context, so you see what is about to be replaced.
Agree totally.
Moreover, I see a little problem in HexEditor - when position is found, it is shown at the beginning of the screen.
It is not a good way to show context.
The better way is to show some lines above the entry - to look around!
Could this be changed now?
Posted: Fri Aug 12, 2005 11:22 am Post subject: Re: GLOBAL REPLACE - new feature
Quote:
Hm...
I think that a choice between Replace Incremental/All (as in HexEditor) is a must...
Actually that's the option I offered - "Control" vs "Automatic". If "Control" is chosen, then you have additional options, "Skip file", "Skip offset" and "Replace".
Quote:
Do You need volunteers to use it immediately?
Here I am! Razz
One little problem.
Obviously, two suggested "Global replace" features are incompatible
You have to choose between using wildcards and the ability to replace shorter with longer strings and the opposite.
Or you insist on both
Edo[/b]
Been a sober person I cannot insist on both, but to be honest - both are necessary!
Leo
OK! But when using wildcards, you cannot use "smart" replacing at the same time! Found string will be simply overwritten.
Otherwise, if wildcards not used, you can "smartly" replace strings of different length, meaning that file will be resized accordingly!
Also, you can just remove some string from the file by leaving "Replace with" box empty
Anyway, there could be an option to control the whole process of replacing strings or to do it automatically.
In first case a dialog can be raised for every file/offset about to be processed. Dialog options are: "Skip file" (even if some replaces in file already done), "Skip offset" and "Replace".
Additionally, found string could be shown in a context, so you see what is about to be replaced.
Agree totally.
Moreover, I see a little problem in HexEditor - when position is found, it is shown at the beginning of the screen.
It is not a good way to show context.
The better way is to show some lines above the entry - to look around!
Could this be changed now?
Leo
I'll try to change that in Hex Editor, but here I just meant to display one line of text (string), not the whole context!
I'll try to change that in Hex Editor, but here I just meant to display one line of text (string), not the whole context!
Edo
What about 3 lines (current line, 1 above and 1 below)?
Leo
I'm afraid it would be quite unpractical, as we don't have defined lines here! It's a stream of chars only. Maybe few chars before and few chars after the found string could be displayed like:
...abcdef/ found string /ghijkl...
Maybe it should be cleared out that "wildcards" used for searching filenames (on the first Find+ page) are not in question in this case! On the contrary you are encouraged to use them in order to "narrow" the files you are about to search using "Global replace"!
The "wildcards" that you use in "Search for string" box are affected here!
All times are GMT + 1 Hour Page 1, 2, 3, 4, 5, 6Next
Page 1 of 6
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum