ftp工具,ftp工具如何连接服务器

FTP用于在FTP服务器和FTP客户端之间上传和下载文件,它最优秀的功能就是可以批量管理,可以将文件从一个主机传输到另一个主机。

IIS7服务器管理工具可以批量管理、定时上传下载、同步操作、数据备份、到期提醒、自动更新。IIS7服务器管理工具适用于Windows操作系统和liunx操作系统;支持Ftp客户端批量操作。真正实现了一站式管理,非常方便。

在这里插入图片描述

public void putTxtToFTP() {
System.out.println(“开始执行定时器任务:维系一键体检订单量!”);
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -1); //得到前一天
Date date = calendar.getTime();
SimpleDateFormat df = new SimpleDateFormat(“yyyyMMdd”);
String yesterday = df.format(date);

StringBuffer yjtjOrderTxt = new StringBuffer();
yjtjOrderTxt.append(“yjtywx_”).append(yesterday).append(".txt");

List yjtjOrderList = activeDataService.wxGetYjtjOrder();

//FtpUtil ftpUtil = new FtpUtil(“hexin”,“hx105155”,“134.64.105.155”, “/yjtydd”); //测试库FTP
FtpUtil ftpUtil = new FtpUtil(“ahftp”,“ahdx@#$_123dic”,“192.168.0.28”, “/yjtydd”);
PrintWriter printWriter = null;
File highFeeFile = new File(Contants.FILE_PATH_BAK + yjtjOrderTxt);//Contants.FILE_PATH_BAK = “/opt/wss/domains/tmp/”
// File highFeeFile = new File(“D:/” + highFeeTxt);
// File gjmyFile = new File(“D:/” + gjmyTxt);
//File highFeeFile = new File(“D:/” + yjtjOrderTxt);
try {
printWriter = new PrintWriter(new FileWriter(highFeeFile, true));
for (int i = 0; i < yjtjOrderList.size(); i++){
printWriter.println(yjtjOrderList.get(i).toString().trim());
}
} catch (IOException e) {
System.out.println(“主动服务 高额数据报表任务异常!”);
}finally{
printWriter.close();
}
if(highFeeFile.exists()){
System.out.println(“主动服务定时器任务 高额数据 上传成功”+yjtjOrderTxt.toString());
ftpUtil.uploadFile(highFeeFile, yjtjOrderTxt.toString());
}else{
System.out.println(“主动服务定时器任务 高额数据 上传失败”+yjtjOrderTxt.toString());
}

System.out.println(“IIS7服务器批量查排名-查询结果”);

}

public ActiveDataService getActiveDataService() {
return activeDataService;
}

public void setActiveDataService(ActiveDataService activeDataService) {
this.activeDataService = activeDataService;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值