在運行下面的代碼,我得到異常jcifs.smb.SmbException:系統找不到指定的文件?
jcifs.smb.SmbException:系統找不到指定的文件
代碼:
public void m1(String b) throws IOException {
// TODO Auto-generated method**strong text** stub
BufferedReader br=null;
String urlToBackUpFile = "smb://" +b +"/" + "c$/Program Files/Office/Config/OfficeSyncData.ini";
String cp="smb://" +b +"/" + "c$/Program Files/Office/Config/OfficeSyncData.txt";
System.out.println("smb folder of source file" + urlToBackUpFile);
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(null, "usrname", "passwd");
SmbFile dir = new SmbFile(cp, auth);
SmbFileInputStream in = new SmbFileInputStream(dir);
// br = new BufferedReader(new InputStreamReader(in));
System.out.println(dir.getDate());
SmbFile dest = new SmbFile (urlToBackUpFile,auth);
//count.copyTo(dest);
dir.copyTo(dest);
}
怎麼辦我解決?
是「b」在指定的路徑? –
'b'的值是什麼,異常是指哪一行? –