package com.timeline.smichanger;
import java.io.File;
public class SmiChange {
public static void main(String[] args) {
// TODO Auto-generated method stub
File folder = new File("C:/Users/jason/Downloads/DragonTV.Zhen.Huan.Zhuan.Complete.HDTV.720p.x264-CHDTV"); // com.timeline.smichanger
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isDirectory()) {
// listFilesForFolder(fileEntry);
} else {
if(fileEntry.getName().endsWith("smi")){
if(fileEntry.getName().startsWith("후궁견환전")){
String EpNo = (fileEntry.getName().replaceAll("후궁견환전, 2011 제", "")
).substring(0, 2);
EpNo = "DragonTV.Zhen.Huan.Zhuan.Ep"+EpNo+".HDTV.720p.x264-CHDTV.smi";
System.out.println(fileEntry.getName() + " : " + EpNo);
String newName = folder.getAbsolutePath() +File.separator + EpNo;
System.out.println(newName);
File dest = new File(newName);
fileEntry.renameTo(dest );
}
}
}
}
}
}
import java.io.File;
public class SmiChange {
public static void main(String[] args) {
// TODO Auto-generated method stub
File folder = new File("C:/Users/jason/Downloads/DragonTV.Zhen.Huan.Zhuan.Complete.HDTV.720p.x264-CHDTV"); // com.timeline.smichanger
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isDirectory()) {
// listFilesForFolder(fileEntry);
} else {
if(fileEntry.getName().endsWith("smi")){
if(fileEntry.getName().startsWith("후궁견환전")){
String EpNo = (fileEntry.getName().replaceAll("후궁견환전, 2011 제", "")
).substring(0, 2);
EpNo = "DragonTV.Zhen.Huan.Zhuan.Ep"+EpNo+".HDTV.720p.x264-CHDTV.smi";
System.out.println(fileEntry.getName() + " : " + EpNo);
String newName = folder.getAbsolutePath() +File.separator + EpNo;
System.out.println(newName);
File dest = new File(newName);
fileEntry.renameTo(dest );
}
}
}
}
}
}
댓글
댓글 쓰기