JAVA Code to Rename all files in a folder
import java.io.*;
public class RenameFileNames
{
public static void main(String[] args)
{
String absolutePath = "E:\\Wllpapers\\unbelive";
File dir = new File(absolutePath);
File[] filesInDir = dir.listFiles();
int i = 0;
for(File file:filesInDir) {
i++;
String name = file.getName();
String newName = "pic" + i + ".jpeg";
String newPath = absolutePath + "\\" + newName;
file.renameTo(new File(newPath));
System.out.println(name + " changed to " + newName);
}
}
}
No
ReplyDeleteNoo9oooooo
ReplyDeleteHi
ReplyDeleteWow, incredible blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your web site is great, let alone the content! ufabet168
ReplyDeleteNice information about android app development thanks for sharing this article.
ReplyDeleteHi,
ReplyDeleteThanks for sharing the information with us it was very informative. Hangup.in