Multi Commander > Feature Requests and Suggestions

Change all links in files in selected folders to lower case


 I am trying to figure out what regex string to use in order  make all characters only btwn http:// and .html within all files in  selected   folder(s)  into   lower case.  Since Linux servers are case sensitive then it seems  (unless one can edit a server's  httpd.conf) then  clicking on a link that begins with a upper case letter can result in a 404 (as here ). Thus I would think it would be helpful for there to be a simple option in the Multi Rename tool to do that (or which I do not see is there already).


Mathias (Author):
Menu > Tools > Rename
And select lower case.  And all selected files/folders are renamed to lower case

Thanks but I had done that and which  was easy to do, but what I had asked was to change  all characters  btwn http:// and .html within all files in  selected   folders, not just the folder and files names.  I looked at lot for the solution ("pray and press")  and what I found as a result was that  to convert upper case letters in links to lower case then

--- Code: ---(http.*[A-Z].*\.[a-zA-Z]{2,4}) worked as a regex in Text Crawler free (though mine is an old ver. 3.0.3) to find 2,238 links in a large file of mine,

as does "http[s]?://.+?"

though (courtesy of Stefan from Grepwin) the pattern of

((http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])) - which includes the parenthesis - seems to find more (3,2006) and also,

href="http[s]?://.+?" finds 3,0033 In Text Crawler.

I did not try  \L\1 to convert to lower case since that is an option offered in the program, and running the above resulted in 3,0033 being changed, though it only changed the case.

--- End code ---
I had also found HTML Tags Change To Uppercase or Lowercase Software that converts uppercase letters in links to lower case, though it is $20 if you want to convert more than one file at a time, and is very slow or can locks up with large files, but it seemed to work well to convert upper case letters in links to lower case in files that I used it for.

I do not know regex (imagine a world in which this was the written language!) but was looking to convert all the upper case caps in links to lower case, and I searched a lot trying to find out how to do this. And so thanks to all who help, whom I thank God for.

Mathias (Author):
So you got file that are named as urls?  hmm wait you can't have : in a file name so you must then mean you got a text file and the in that text files you got URL's ?


[0] Message Index

Go to full version