This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: Is there a 'ping' in cygwin?
- From: "DePriest, Jason R." <jrdepriest at ftb dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 20 Oct 2003 10:29:39 -0500
- Subject: RE: Is there a 'ping' in cygwin?
> -----Original Message-----
> From: cygwin-owner@cygwin.com
> [mailto:cygwin-owner@cygwin.com] On Behalf Of Hughes, Bill
> Sent: Monday, October 20, 2003 10:05 AM
> To: 'cygwin@cygwin.com'
> Subject: RE: Is there a 'ping' in cygwin?
[- snip -]
> Now do I bother writing something to rename all .EXE to lower
> case? I don't
> think so.
[- /snip -]
I already did for similar reasons. It doesn't recurse directories and
it renames ALL files (not just .exe), but it does work.
[- perl script -]
# This script will take files names that are in
# capital letters and convert them to lower case
# letters. I'm going to use the easy way. Copy
# the file to a temp file, delete the original,
# then copy the temp file back to the original
# file name in lower case letters.
use File::Copy;
$PathToFiles = $ARGV[0];
chdir($PathToFiles);
@FileNameList = glob("*.*");
foreach $FileName (@FileNameList) {
$FileNamelc = lc $FileName;
copy("$PathToFiles\\$FileName","$PathToFiles\\$FileName\.tmp");
rename("$PathToFiles\\$FileName","$PathToFiles\\$FileNamelc");
unlink("$PathToFiles\\$FileName\.tmp");
print "$FileName renamed to $FileNamelc\n";
}
[- /perl script -]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/