Often in Bash you may want to rename all files in a particular directory to uppercase.
You can use the following syntax to do so:
for file in * ; do
mv "$file" "${file^^}"
done
This particular example will rename all files in the current directory to uppercase.
Note that this syntax uses the ${file^^} syntax to convert the filenames to uppercase, which is known as shell parameter expansion.
You can find the complete documentation for shell parameter expansion here.
The following example shows how to use this syntax in practice.
Example: How to Rename All Files to Uppercase in Bash
We can use the ls command to first view all files in our current directory:

We can see that the current directory has the following files:
- coaches.txt
- leagues.txt
- rosters.txt
- teams.txt
Suppose that we would like to rename each of these filenames to uppercase.
We can use the following syntax to do so:
for file in * ; do
mv "$file" "${file^^}"
done
The following screenshot shows how to use this syntax in practice:

Notice that when we use the ls command once again to view the updated filenames in the current directory we can see that all filenames have been converted to uppercase:
- COACHES.TXT
- LEAGUES.TXT
- ROSTERS.TXT
- TEAMS.TXT
Feel free to use similar syntax to rename all of the files in your own folder to uppercase.
Note: If you would only like to convert specific files to uppercase then you can replace * with *.txt, *.csv, *.xlsx, etc.
Related Tutorials
The following tutorials explain how to perform other common tasks in Bash:
Bash: How to Add Prefix to All Files in Directory
Bash: How to Replace Specific Text in Multiple Files
Bash: How to Replace Specific Line in File
