| | |
| | | file.delete(); |
| | | } |
| | | } |
| | | public static void deletess(String fileName){ |
| | | File file = new File("D:\\anbao\\"+fileName); |
| | | if (file.isFile() && file.exists()) { |
| | | file.delete(); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (files.length==0){ |
| | | return false; |
| | | } |
| | | else { |
| | | for (FTPFile file : files){ |
| | | String fileName = file.getName(); |
| | | String substring1 = fileName.substring(0, 1); |
| | |
| | | } |
| | | //删除本地文件 |
| | | MysqlCenlint.deletes(fileName); |
| | | MysqlCenlint.deletess(fileName); |
| | | FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName); |
| | | //is.close(); |
| | | ftp.completePendingCommand(); |
| | | return true; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //InputStream is = ftp.retrieveFileStream(new String(file.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING)); |
| | | |