Bulk Replace of 4k files with different strings in URL (help, please)
-
Hi. I have to bulk edit about 4k files in a folder. some links have site.com/whatever/a different string here for each page.
how do i delete that entire link using replace? the beginning of each link is the same, but the remainder in that link is different on every page.
can i add an * or something.
please jeebus don’t tell me i’m gonna have to open each of the 4k pages to change! :)
thanks!
-
@Allen-M
You’ve provided little detail, but you might give this a try:
Find box:
site.com/\S+
Search mode: Regular expression -
i provided little detail? what more would you like and i’d be happy to provide.
thanks in advance…
@Alan-Kilborn said:
You’ve provided little detail, but you might give this a try:
Find box: site.com/\S+
Search mode: Regular expression -
@Allen-M
Well, since you seem to think you provided enough detail, let’s assume you have…
Did you try what I gave you earlier to see if it matches?
If so, did it match? If it did, then isn’t the replacement obvious? In case it is not obvious, to delete something you matched, you replace it with nothing in the Replace box. And to extend it to 4000 files, you simply use Replace in Files rather than Replace. But, I like to start small and see if there’s correct matching in a single file first…helps avoid the potential to screw up 4000 files (which isn’t undoable). A Replace or several in a single file is most definitely undoable.
If it didn’t match, well then, I guess we’re back into that need-those-nasty-details area. Real examples are best.
-
Well, OK…slight mod to the original (it mostly worked the first way):
Find box:
site\.com/\S+
-
@Alan-Kilborn – you seem less of a help and more of a passive-agressive troll. why? i simply asked what other details would you like? simple question…and innocuous. you say i provided little detail, so i asked what other details do you want? you never answered my question. and no…i didn’t try your example because if you didn’t understand my inquiry, why would i try your answer to a question you didn’t comprehend (or that i didn’t give enough info on)?
hope you see this before i delete my account and this software.
-
@Allen-M said:
some links have site.com/whatever/a different string here for each page.
@Alan-Kilborn provided you what you needed, no “passive-aggressive troll” in it.
What you probably failed to understand is that we DO want to help, but we ONLY ask that the poster helps us to help them, hence the request for some real data.
All to often we get asked in a manner similar to your post with what appears to be “artificial” data. We supply a solution only to find that the poster neglected to explain something which changes the whole solution. Sure the real data may be confidential. In that case please say so and in the example reference it as such.
In your example I’d say the “site.com” is artificial. So if you’d said so, then @Alan-Kilborn would have said in reference to his supplied regex, replace the site.com with the real address. Of course note that the
.
is a special character and must be “delimited”, hence his revised regex with the\.
in it.So it’s your choice whether to use Notepad++ or not, I’d say it will definitely make your request much easier to process if you do expand on the information/examples provided. We too can then expand of the reply.
Terry
-
@Alan-Kilborn said:
Well, OK
He left in a hurry! After posting (in your defence) I looked at his profile, ONLY to find it’s gone. a short fuse perhaps?
Terry