Solved

Cpoying files UPPERCASE

Posted on 2000-04-19
6
216 Views
Last Modified: 2010-04-21
How can I copy files if I want their names to be always in Uppercase?
0
Comment
Question by:rolli
[X]
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
  • 4
6 Comments
 
LVL 21

Expert Comment

by:tfewster
ID: 2732087
If you mean you want to rename files so the names are all upper case:

#/bin/sh
#upper.sh
#Usage upper.sh filename
mv $1 `echo $1 |tr [:lower:] [:upper:]`



0
 
LVL 21

Expert Comment

by:tfewster
ID: 2763485
As you haven't given us any feedback I'll assume my comment gave you what you needed :)
0
 

Author Comment

by:rolli
ID: 2770433
It would be an excellent answer, but I need the files inside the folders to be 'uppercased' as well, so keep trying!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 21

Expert Comment

by:tfewster
ID: 2770741
OK, using that script:

cd directory_containing_files_to_be renamed
find . -depth -exec /path/to/upper.sh {} \;

This will rename everything below the start point for the find - directories, subdirectories & files, but the "find" won't follow links.

Is this a one-off task, or would it be better to consider how to give the files "good" names when they are created? Please expand...
0
 
LVL 84

Expert Comment

by:ozo
ID: 2771211
perl -MFile::Find -e 'find(sub{rename $_,uc $_ or warn "$_:$!" if /[a-z]/ },".")'
0
 
LVL 21

Accepted Solution

by:
tfewster earned 50 total points
ID: 2818228
I guess you've done the job by now, so would you like to accept one of the comments (from whoever supplied the method you used) as an answer?
0

Featured Post

Independent Software Vendors: 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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

634 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