C: という名前の sourceconsists に 1 つの .dat ファイルと 1 つの .zip ファイルで構成されるフォルダーがあるという奇妙な状況に陥っています。zip ファイルのみを c の別のディレクトリに移動したい: 名前付きターゲット
1) まず、ソース フォルダーから .zip ファイルを取得するロジックを作成する必要があります。
私が試したことは...
private void filemove(String FilePath2, String s2) { filepath2 contains the location of source c:\\source
String destination ="C:\\target\\"
try {
File f = new File(FilePath2);
if (f.getName().endsWith(".zip")) {
//please advise the logic to copy the file to destination folder
}
} catch (Exception e) {
e.printStackTrace();
}
}
ファイルを宛先フォルダーにコピーするロジックを教えてください