Toby Inkster wrote:
Roy Schestowitz <firstname.lastname@example.org> wrote:
Is there a script that renames all directories and files to pure
lowercase and then changes all links in the files appropriately?
That's pretty basic so I doubt there's a script for it. To rename the
files to lowercase (in bash):
for $fn in `find -name '*.html' | sort -r`; do mv $fn `echo $fn | tr
[:upper:] [:lower:]`; done
But that doesn't update the links. For that you'll probably want to do a
bit of Perl regexp stuff.
Are you sure you read Mitja's whole post?
To do the magic inside the files:
perl -p -i -e 's/(href=".*?")/\L$1/' `find -name '*.html'`