Package com.enterprisedt.net.ftp

Examples of com.enterprisedt.net.ftp.FTPClient.dir()


            ftp = new FTPClient();
            ftp.setRemoteHost(host);

            ftp.login(user, password);
           
            ftp.dir(".", false);

            // binary transfer
            if (mode.equalsIgnoreCase("BINARY")) {
                ftp.setType(FTPTransferType.BINARY);
            }
View Full Code Here


            // ASCII transfer
            ftp.setType(FTPTransferType.ASCII);

            // test that list() works
            String[] listing = ftp.dir(".");
            for (int i=0; i<listing.length; i++)
              System.out.println(listing[i]);

            // test that dir() works in full mode
            String[] listings = ftp.dir(".", true);
View Full Code Here

            String[] listing = ftp.dir(".");
            for (int i=0; i<listing.length; i++)
              System.out.println(listing[i]);

            // test that dir() works in full mode
            String[] listings = ftp.dir(".", true);
            for (int i = 0; i < listings.length; i++)
                System.out.println(listings[i]);

            // try system()
            System.out.println(ftp.system());
View Full Code Here

        oFTPC = new FTPClient(sHost);
        if (DebugFile.trace) DebugFile.writeln("FTPClient.login(" + sUsr + "," + sPwd + ")");
        oFTPC.login(sUsr, sPwd);
        bFTPSession = true;
        if (DebugFile.trace) DebugFile.writeln("FTPClient.dir(" + sPath + ")");
        aFiles = oFTPC.dir(sPath);
      oFTPC.quit();
    } catch (FTPException ftpe) {
      throw new IOException(ftpe.getMessage());
    }
    if (aFiles!=null) {
View Full Code Here

            //System.out.println("Page saved to url "+loadProps[1].Value);
           
          }
         
          if(!host.equals("localhost")){
            String[] files = ftp.dir();
                  for (int i = 0; i < files.length; i++){
                    //System.out.println("Transfer of "+files[i]+ "to "+destinationFolder+"/"+files[i]);
                    if(!files[i].equals("presentation.ppt"))
                      ftp.get(destinationFolder+"/"+files[i],files[i]);
                    ftp.delete(files[i]);
View Full Code Here

            // test that list() works
            String listing = ftp.list(".");
            System.out.println(listing);

            // test that dir() works in full mode
            String[] listings = ftp.dir(".", true);
            for (int i = 0; i < listings.length; i++)
                System.out.println(listings[i]);

            // try system()
            System.out.println(ftp.system());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.