Here you can find the source of renameToUpperCase(File dir)
public static void renameToUpperCase(File dir) throws IOException
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { public static void renameToUpperCase(File dir) throws IOException { File files[] = dir.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { files[i].renameTo(new File(files[i].getParentFile(), files[i].getName().toUpperCase())); if (files[i].isDirectory()) { renameToUpperCase(files[i]); }/*from w ww. ja v a 2 s . c o m*/ } } } }