<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ralph Thaller said the following on 11/23/2006 03:05 PM:
<blockquote
cite="midbedffab20611231205v144cad8aq1baf7ed6bf8f191c@mail.gmail.com"
type="cite"><br>
<br>
<div><span class="gmail_quote">2006/11/23, Alex Janssen <<a
href="mailto:alex@ourwoods.org">alex@ourwoods.org</a>>:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ralph
Thaller said the following on 11/23/2006 03:07 AM:<br>
> he thx guys<br>
><br>
> but how can i change the name from aSdFdasdDfd to Asdfdasddf?<br>
><br>
> 2006/11/22, Tony Arnold <<a
href="mailto:tony.arnold@manchester.ac.uk">
tony.arnold@manchester.ac.uk</a><br>
> <mailto:<a href="mailto:tony.arnold@manchester.ac.uk">tony.arnold@manchester.ac.uk</a>>
>:<br>
><br>
> Ralph,<br>
><br>
> Ralph Thaller wrote:<br>
> > Hi!
<br>
> > I have a big problem: i have an installer but the names
of the<br>
> folders<br>
> > are in capital letters but not in die installert script.
so i<br>
> have to<br>
> > rename all folders "ASDF" into "Asdf" and so on...
<br>
> ><br>
> > can i do this with a script?<br>
><br>
> Have a look at 'rename'. There is a man page for it.<br>
><br>
> Regards,<br>
> Tony.<br>
> --<br>
> Tony Arnold, IT Security Coordinator, University of
Manchester,
<br>
> IT Services Division, Kilburn Building, Oxford Road, Manchester<br>
> M13 9PL.<br>
> T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773
330<br>
> 0039<br>
> E: <a href="mailto:tony.arnold@manchester.ac.uk">
tony.arnold@manchester.ac.uk</a><br>
> <mailto:<a href="mailto:tony.arnold@manchester.ac.uk">tony.arnold@manchester.ac.uk</a>>,
H:<br>
> <a href="http://www.man.ac.uk/Tony.Arnold">http://www.man.ac.uk/Tony.Arnold
</a><br>
><br>
> --<br>
> ubuntu-users mailing list<br>
> <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>
<mailto:<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com
</a>><br>
> Modify settings or unsubscribe at:<br>
> <a
href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
><br>
><br>
Look at <a href="http://www.vicman.net/lib/toggle-case.htm">
http://www.vicman.net/lib/toggle-case.htm</a>.<br>
-Alex<br>
<br>
--<br>
<a href="http://Ourwoods.org">Ourwoods.org</a><br>
Charlottesville, Virginia<br>
<br>
<br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a
href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a></blockquote>
<div><br>
<br>
these programs are for windows?<br>
<br>
Ralph <br>
</div>
<br>
</div>
<br>
</blockquote>
I'm so embarrassed!<span class="moz-smiley-s6"><span> :-[ </span></span><br>
So, I whipped up a script for you.<br>
<tt><br>
# rename files to Title Case<br>
FLIST=`ls`<br>
for FNAME in $FLIST<br>
do <br>
NEWNAME=`echo $FNAME | awk '{print toupper(substr($1,1,1))
tolower(substr($1,2))}'`<br>
echo "mv $FNAME $NEWNAME"<br>
done<br>
<br>
</tt>This script will generate all the commands for you to run in a
script to rename your files to the title case you have suggested. Save
the above code into a file and change the permissions so it is
executable ( chmod +x filename). It will only change the first letter
of a filename to uppercase and the rest of it to lower case. In it's
current form it is harmless. <br>
<br>
If this doesn't do what you want, maybe we can expand on it. <br>
<br>
If it does, edit the next to last line so it reads:<br>
<tt>mv "$FNAME" "$NEWNAME"<br>
</tt><br>
Then when you run it, it WILL change the names of all the files and
directorys in the current directory.<br>
<br>
Alex<br>
<pre class="moz-signature" cols="72">--
Ourwoods.org
Charlottesville, Virginia
</pre>
</body>
</html>