Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

Skip to comments.

How can I change all characters in link addresses (or only btwnhttp:// and .html) <b>within<b> all files in selected folder(s) into lower case? Maybe a batch file or regex string. I have utilities in Windows such utilities Multi Commander, GrepWin, etc.
Freerepublic.com ^ | Thu, 12/02/21 | daniel1212

Posted on 12/02/2021 3:36:29 PM PST by daniel1212

click here to read article


Navigation: use the links below to view more comments.
first previous 1-2021-4041-57 next last
To: bhl
"But since html and http are (usually/conventionally) lower case, you could just go through the files and convert them all to lower case."

Again, I can find all the links, but looking for and changing maybe hundreds one by one takes a lot of time.

21 posted on 12/02/2021 4:06:53 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 10 | View Replies]

To: T.B. Yoits

A pretty simple PERL script would do this as well.


22 posted on 12/02/2021 4:08:01 PM PST by Woodman
[ Post Reply | Private Reply | To 16 | View Replies]

To: daniel1212

What’s your time frame for getting this done?


23 posted on 12/02/2021 4:08:29 PM PST by BiglyCommentary
[ Post Reply | Private Reply | To 21 | View Replies]

To: daniel1212

PERL example:

# create a perl string
$a = ‘FOO BAR’;

# convert the string to lowercase
$b = lc $a;

# print it
print $b;


24 posted on 12/02/2021 4:13:06 PM PST by Woodman
[ Post Reply | Private Reply | To 1 | View Replies]

To: Repeal The 17th
"Yes, here it is, plain as day:"

Wow. That is good. That I get my error (even after doing a dns flush) is bad. And I just tried certain pages on a Linux PC here and I get the same error. Mind checking some in here: http://peacebyjesus.net/new_testament_toc.html

25 posted on 12/02/2021 4:14:43 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 13 | View Replies]

To: daniel1212

https://convertcase.net/


26 posted on 12/02/2021 4:18:16 PM PST by Pollard (PureBlood -- youtube.com/watch?v=VXm0fkDituE)
[ Post Reply | Private Reply | To 1 | View Replies]

To: T.B. Yoits
"Windows Powershell (built into Windows 7 and newer) can handle this. https://stackoverflow.com/questions/3822745/rename-files-to-lowercase-in-powershell Use -Recurse if you want to change filenames in subfolders too. "gci" is the PowerShell abbreviation for Get-ChildItem gci -Recurse | ? { $_.Name -cne $_.Name.ToLower() } | % { ren $_.Name -NewName $_.Name.Tolower() }"

Thanks. I will try to do it in a new folder. How do you direct it to just the correct directory? I do have a (customized) right click option on my folders to Open command prompt here but that is not the Power Shell for it is the Admin command prompt.

27 posted on 12/02/2021 4:25:30 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 16 | View Replies]

To: BiglyCommentary
"What’s your time frame for getting this done?"

Well ASAP. It should not take long once and if the scripting is correct.

28 posted on 12/02/2021 4:27:40 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 23 | View Replies]

To: Woodman

PERL example:

# create a perl string
$a = ‘FOO BAR’;

# convert the string to lowercase
$b = lc $a;

# print it
print $b;

I have no idea what that tells me to do, sorry.

29 posted on 12/02/2021 4:29:03 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 24 | View Replies]

To: daniel1212

Works just fine...
-
This is a work-in-progress, and a continuation of a complete Old Testament chapter-by-chapter Bible study begun here at Christians Unite (no formal affiliation). All Bible text is from the King James version, in which most words which are supplied by the translators are in italics (most other translations do not do this), though I have chosen to have them placed in brackets. The (free) software source for the Bible text is TheWord, which supplies cross references with the text, seen in blue small fonts (i.e. Mark 8:38; Luke 9:26; Luke 12:8; 2Tim 2:12). Also, texts taken or paraphrased from the Old Testament are in bold. In addition, in addition to a few more cross references, beginning with Romans I often am adding red Scripture references within the Bible text in certain places where Paul’s teaching, by the Spirit of Christ, more particularly relates to the gospels, in principal and or in precept. (ie. Lk. 24:27,44; Acts 17:2; 28:23) Most of the commentary (see note below) is provided through the free E-sword Bible program. Thanks be to God for all, but above all for the Scriptures themselves.


30 posted on 12/02/2021 4:30:49 PM PST by Repeal The 17th (Get out of the matrix and get a real life.)
[ Post Reply | Private Reply | To 25 | View Replies]

To: daniel1212

Copy those links into a text file, and then process that into a .bat file that renames the files. Save it, then execute it. You can find sed and gawk that run on windows. One place to get those unix utilities that run on windows is inside the WinAVR compiler distribution. (Not the Microchip distribution)
Instructions for using sed and gawk are easily available, but somewhat cryptic. I still use them from time to time. Work with copies of files; otherwise, you will mangle them until you hit paydirt with the scripts.


31 posted on 12/02/2021 4:37:39 PM PST by GingisK
[ Post Reply | Private Reply | To 14 | View Replies]

To: T.B. Yoits

Oh, lookie there!


32 posted on 12/02/2021 4:38:29 PM PST by GingisK
[ Post Reply | Private Reply | To 16 | View Replies]

To: Pollard
"https://convertcase.net/"

Well thanks, but that is only going to change text I put in it, which means finding and coping and pasting and changing and putting the the words back into there place within files one by one, vs. batch changing the case of text within a line within 800 files.

33 posted on 12/02/2021 4:40:12 PM PST by daniel1212 ( Turn to the Lord Jesus as a damned+destitute sinner, trust Him to save + be baptized + follow Him!)
[ Post Reply | Private Reply | To 26 | View Replies]

To: daniel1212
sed 's/[A-Z]/\L&/g'

The above is the command to change text to lower case.

34 posted on 12/02/2021 4:40:40 PM PST by ShadowAce (Linux - The Ultimate Windows Service Pack )
[ Post Reply | Private Reply | To 18 | View Replies]

To: daniel1212

link worked fine for me ...


35 posted on 12/02/2021 4:48:30 PM PST by bankwalker (Repeal the 19th ...)
[ Post Reply | Private Reply | To 1 | View Replies]

To: daniel1212

Here’s your framework. You want to do this in two passes.

First pass - change all the html file names to lower case.
Second pass - Change all references to those files within the html files to lower case to match.

You go to the root where the files exist.

#pass 1
find . -name “*.html” -exec (file names to lower case rename script) {} \;

#pass 2
find . -name “*.html” -exec (file edit to lower case script) {} \;

So the () above just needs to be filled in.

Any you always copy your root to a test area before you let the about rip.


36 posted on 12/02/2021 4:56:24 PM PST by BiglyCommentary
[ Post Reply | Private Reply | To 28 | View Replies]

To: daniel1212

Sorry was thinking to technical. What I was saying is a simple Perl script will take text and rewrite it all in lower case (or upper case). With a few more lines of code can be made to search within text and convert as well. PERL is a scripting language written mainly to manipulate files and text although it can do much more. I’m just a very basic user of PERL, not really a programmer. However all the languages I know have a basic to upper or to lower command. Some are easier to use than others. HTML is really just a text file and can be manipulated as such.


37 posted on 12/02/2021 5:05:19 PM PST by Woodman
[ Post Reply | Private Reply | To 29 | View Replies]

To: daniel1212

Ask on a linux forum or a linux specific https://unix.stackexchange.com/.

You’re mostly asking people who can’t even do html as evidenced by three separate FR threads where someone learned to post an image or you’re dealing with people who used to be techies a decade or two ago or are in some obscure tech field.

https://unix.stackexchange.com/

Someone there will answer and a bunch of other people will vote and then you take the highest voted answer. The answer will likely give you the regex/code you need.

askubuntu is another place. Those two will get you an answer for most anything Linux and many servers run Ubuntu Server.


38 posted on 12/02/2021 5:05:54 PM PST by Pollard (PureBlood -- youtube.com/watch?v=VXm0fkDituE)
[ Post Reply | Private Reply | To 33 | View Replies]

To: BiglyCommentary

In pass 2 you can exec sed with a regex to match on a html file name within the text and change the case.


39 posted on 12/02/2021 5:16:51 PM PST by BiglyCommentary
[ Post Reply | Private Reply | To 36 | View Replies]

To: daniel1212

Again, I would try the spell check apache module. You might not need to do anything if you install it.


40 posted on 12/02/2021 5:43:34 PM PST by bhl
[ Post Reply | Private Reply | To 21 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-57 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
Bloggers & Personal
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson