![]() Registered Member ![]()
|
I have a large directory of html files, from which I need to remove particular characters and path information. I am struggling a bit with kfilereplace. It is easy for me to get it to replace a character string with another - but I cannot work out how to get it to just delete a string from all of my files.
Can anyone help - or recommend a different package that I could try? Thanks in anticipation. |
![]() Registered Member ![]()
|
Can't you replace it with an empty string?
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
![]() Registered Member ![]()
|
Thanks for your reply! No, I cannot work out how to do this. In the 'Search and replace in files' dialogue I can enter the string I want to find in the 'Search' box - and kfilereplace will find it. However, if I leave the 'Replace' box blank, the program will take no action. In fact the 'Replace' option in the main program window stays greyed out. Is there another character or expression that I need to insert into the 'Replace' box if I want a string just to be deleted, rather than replaced by another string? |
![]() Manager ![]()
|
there's an old bug report regarding this https://bugs.kde.org/show_bug.cgi?id=124626, voting for it couldn't hurt
you should be able to do this using find and grep or sed, Google'ing will get you various solutions A couple of things I found that should do this that are gui based - Jedit - http:/jedit.org "Multiple file search and replace; search in either the current file, all open files, or all files in a directory" - FAR - http:/findandreplace.sourceforge.net "FAR is a simple tool for search and replace operations over multiple files" too bad Kate doesn't seem to allow this |
![]() Registered Member ![]()
|
Thanks very much for your advice. I am seeking a GUI method, as I want a solution that will not terrify colleagues who have no experience of the command line! I'll take a look at Jedit and FAR. |
![]() Administrator ![]()
|
You might also want to look at KWrite/Kate which can perform find/replace (and do support replacing it with a blank, i've done it before)
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar