Solved

Cpoying files UPPERCASE

Posted on 2000-04-19
6
214 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
  • 4
6 Comments
 
LVL 20

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 20

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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 20

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 20

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux : adding the new user with password option, 11 113
text in table need to be center of the box 4 81
LINUX ZIP - UNCOMPRESS WINDOWS PATH 3 104
unix solaris snoop command 6 113
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

830 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