そのディレクトリ内にディレクトリとcsvファイルを作成しようとしています。ディレクトリは作成されますが、ファイルの作成時に例外が発生します これが私のコードです
File dirName = new File("C:\\Umair\\Trace Bandwidth Statistics");
if (!dirName.exists())
dirName.mkdir();
DateFormat df = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
File file = new File( dirName + "\\"+ df.format(new Date()) +"_Statistics.csv");
if ( !file.exists() )
file.createNewFile();
この例外が発生します java.io.IOException: ファイル名、ディレクトリ名、またはボリューム ラベルの構文が正しくありません
何か案が?
ありがとう