java定时任务_ftp免费空间,利用ftp工具定时连接ftp免费空间教程及java配置

IIS7服务器管理工具支持FTP站点批量管理与定时上传下载等自动化操作,适用于中文用户的使用习惯。本文介绍其核心功能及配置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

IIS7服务器管理工具
这款ftp客户端软件,可以批量管理ftp站点,还可以实现ftp定时上传、定时下载,定时备份、自动更新等功能。
关于ftp客户端功能,它主要实现以下四点功能:
1、ftp 批量操作
2、ftp 定时同步(上传或下载)
3、网页80端口下载
4、webshell批量上传下载
iis7服务器管理工具是一款服务器集成管理软件,支持免费体验。纯中文的管理系统,更符合国人的使用体验。
官网传送门:http://fwqglgj.iis7.net/cp/ftp/?tscd-zc
配置方式:
一、选择ftp窗口,点击FTP设置
二、进入“FTP设置”—“任务设置”后,我们先添加任务
1、新建任务(一个任务只能选择一种时间周期)
1-1:如何设置 天级定时上传或下载任务

0342b5c3b63db099872db76aeab6e9c4.png

1-2:如何设置 周级定时上传或下载任务

0c393c49af6c39e5042c1817b5160bab.png

1-3:如何设置 月级定时上传或下载任务

4c82008d4100957202f046b1933a5a0d.png

注意点:备份类型的选择
追加:新文件。
修改:新文件,或者修改内容后的文件。
覆盖:不对比文件,直接覆盖原文件。(不推荐)
2、接下来选择FTP(以下示例定时上传操作教程)
2-1:点击“选择FTP”

2a1c358f5378b9032898bda68a75e400.png

2-2:进入FTP绑定界面

df7d8abec8634b736aff2e31f9042e97.png

2-3:成功绑定一台ftp站点

1292ab0a390c48aeec46da1774375661.png

2-4:ftp绑定信息及任务执行结果会在设置界面下方显示

022af42a1fac19107b0fa1cf5c85dd0d.png

三、提示任务上传成功之后,我们去对应ftp服务器查看任务是否上传完成
经查看,文件已成功上传!

ca208d99da832d538d47bba16a81a370.png

注意:本文以上传为例,如果需要下载只要将传输方向改为“下载”即可!
java配置方式如下:
import com.enterprisedt.net.ftp.*;
public class FtpClient {
static FTPClient ftpClient;
public FtpClient(){};
String remoteAddress="192.168.168.33",userName="cattsoft",password="cattsoft";
public void DownLoad(){
try{
FTPClient client = new FTPClient();
client.setRemoteHost(remoteAddress);
client.connect();
client.login(userName,password);
client.setType(FTPTransferType.BINARY);
client.get("E:uploadindex.jsp","/home/cattsoft/jakarta-tomcat-5.0.28/webapps/vip/dkf/index2.jsp");
client.quit();
System.out.println("下载成功...");
}catch(Exception e){
e.printStackTrace();
System.out.println("下载失败...");
}
}
public static void main(String[] args){
FtpClient fc = new FtpClient();
fc.DownLoad();
}
}
java下配置连接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("服务器批量查排名-查询结果");
}
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、付费专栏及课程。

余额充值