質問編集履歴

1

拡張子なしファイル名取得の処理を追加しました。

2016/05/28 02:34

投稿

Hyonta
Hyonta

スコア36

test CHANGED
File without changes
test CHANGED
@@ -62,6 +62,12 @@
62
62
 
63
63
 
64
64
 
65
+ //拡張子なしファイル名
66
+
67
+ String filename = outputFileName.substring(0, extensionIndex);
68
+
69
+
70
+
65
71
  // 同名ファイルが存在する場合、出力ファイルに枝番を付与する処理
66
72
 
67
73
  int branch = 0;
@@ -70,7 +76,7 @@
70
76
 
71
77
  branch++;
72
78
 
73
- outputFile = new File(outputPath + outputFileName + "_" + branch + extension);
79
+ outputFile = new File(outputPath + filename + "_" + branch + extension);
74
80
 
75
81
  }
76
82