Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. public class FTPSyncTestApp {
  2. private final static String FTP_SERVER = "ftp.raw.de";
  3. private final static int FTP_PORT = 21;
  4. private final static String FTP_DIR = "";
  5. private final static String FTP_USER = "dataimplant";
  6. private final static String FTP_PASS = "loli8]-6";
  7. private final static String FTP_LOCAL_SYNC_DIR = "\\\\192.168.1.201\\daten\\kundenverzeichnisse\\raw";
  8. private final static String FTP_TRANSFER_TO_FILE_LIST_DIR = "\\\\IMANAS\\filesys\\log\\scraw001\\raw2imasol\\FTP_TRANSFER_TO_FILE_LIST_DIR.txt";
  9. private final static String FTP_TRANSFER_FROM_FILE_LIST_DIR = "\\\\IMANAS\\filesys\\log\\scraw001\\imasol2raw\\FTP_TRANSFER_FROM_FILE_LIST_DIR.txt";
  10.  
  11. public static void main(String[] args) {
  12. // TODO code application logic here
  13.  
  14. syncWithFtpServer();
  15. }
  16.  
  17. private static boolean syncWithFtpServer() {
  18. boolean anyFileExists = false;
  19. FTPSync ftpSync = new FTPSync(FTP_SERVER, FTP_PORT, FTP_DIR, FTP_USER, FTP_PASS, FTP_LOCAL_SYNC_DIR,
  20. FTP_TRANSFER_TO_FILE_LIST_DIR, FTP_TRANSFER_FROM_FILE_LIST_DIR);
  21. ArrayList<String> al = ftpSync.transferFromFTP();
  22. if (al.size() > 0) {
  23. anyFileExists = true;
  24. }
  25. return anyFileExists;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement