Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to connect to FTP and how to configure it

Shulou Source: shulou.com Published: 2022-06-01 00:34:50 10月03日 Update

FTP connection method and configuration is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Connect remotely using the FTP upload tool

FTP is used to upload and download files between FTP servers and FTP clients, and its best feature is batch management, which can transfer files from one host to another.

Address: FTP upload tool

The best feature of using FTP upload tool is batch management and batch upload, which is suitable for Windows system, Linux system and CVM, which can greatly improve the work efficiency of webmaster and server operation and maintenance personnel. At the same time, FTP upload tool is also a vnc client, which really realizes one-stop management, which is very convenient.

Configure connection FTP under java:

Public void putTxtToFTP () {System.out.println ("start timer task: maintain an one-click order!") ; Calendar calendar = Calendar.getInstance (); calendar.add (Calendar.DATE,-1); / / get the previous day 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"); / / Test Library 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 ("opt/wss/domains/tmp/ /" + highFeeTxt); / / File gjmyFile = new File ("DRV /" + gjmyTxt); / / File highFeeFile = new File ("DRV /" + yjtjOrderTxt); try {printWriter = new PrintWriter (new FileWriter (highFeeFile, true)); for (int I = 0; I < yjtjOrderList.size ()) PrintWriter.println (yjtjOrderList.get (I). ToString (). Trim ());} catch (IOException e) {System.out.println ("active service high data report task exception!") ;} finally {printWriter.close ();} if (highFeeFile.exists ()) {System.out.println ("active service timer task high data uploaded successfully" + yjtjOrderTxt.toString ()); ftpUtil.uploadFile (highFeeFile, yjtjOrderTxt.toString ()) } else {System.out.println ("active service timer task high data upload failed" + yjtjOrderTxt.toString ());} System.out.println ("Server batch search rankings-query results");} public ActiveDataService getActiveDataService () {return activeDataService;} public void setActiveDataService (ActiveDataService activeDataService) {this.activeDataService = activeDataService } is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Services tasks tools servers initiatives timers data management configuration excellence hosts functions clients clients that is files systems help methods methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Docker Microsoft Huawei OPPO Reno