change name to uppercase

Posted on 2005-03-09
Medium Priority
Last Modified: 2010-04-21
Can someone help me to change all filenames in a directory to uppercase? Right now there are various case used (files came off a windows machine). I need to change both the name and the extension to uppercase.

I am using redhat 9 OS.

Thanks in advance.
Question by:James Stone
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 48

Expert Comment

ID: 13501019
A generic way (you can use bash builtins to be more efficient) is:

for file in /some/dir/*
  mv $file `echo $file | tr [a-z] [A-Z]`
LVL 48

Accepted Solution

Tintin earned 500 total points
ID: 13501024
Whoops, should do a:

cd /some/dir

for file in *
   mv $file `echo $file | tr [a-z] [A-Z]`

The first version would have attempted to uppercase the dirs as well.

Author Comment

by:James Stone
ID: 13501424
Thank you! Worked great.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question