Re: [SLUG] Change case of filenames

From: Chuck Fricke (cfricke@tampabay.rr.com)
Date: Sun Dec 07 2003 - 12:16:48 EST


This script will change all uppercase filenames to lowercase in the current
directory. The script makes the mv command interactive which will prompt
before overwriting existing filenames.

for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z' '[a-z]' `; done;

Hope this helps.

----- Original Message -----
From: "jeff" <jdavis70@tampabay.rr.com>
To: <slug@nks.net>
Sent: Saturday, December 06, 2003 9:07 PM
Subject: [SLUG] Change case of filenames

> I downloaded an ebook today which has a problem. The filenames are all
> uppercase but the TOC page and the index.htm links are specifying that
> filename in lowercase, and with Linux being case sensitive obviously the
> file is not found. Is there an easy and quick way to change all the 150+
> filenames (they are all html and jpg files) in that directory from
> uppercase to lowercase?
>
> Thanks,
> Jeff
>
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS). Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:24:31 EDT