Apache Commons Net FTP : ListFiles not displaying all dirs and files

So I am doing this:
FTPClient f = new FTPClient();
f.connect("foo.bar.com");
boolean login = f.login("User","Pass");
FTPFile[] list = f.listFiles();
When I doing a "list.length" I get 2. When I list it out it just shows that it retrieved the directories only. I know there are more files there....
Here is the wierd thing. When I manually FTP from this Windows box and do a dir I only get the two listings. When I FTP from my linux box I get the full directory listing (those two directories and more files).
Any ideas as to why I am not picking these up?
Thanks,
Michael

File permissions / hidden / visible etc?

Similar Messages

  • Connect to FTP site with Apache commons net FTP client through Proxy

    Hello,
    I am trying to run this simple code to connect to FTP site through a proxy.
    import org.apache.commons.net.ftp.FTP;
    import org.apache.commons.net.ftp.FTPClient;
    public class MyTest {
    public static void main(String[] args) {
    String ftpHostName = "ftp.xxx.com";
    int ftpPort = 21;
    String ftpUserName = "myUserName";
    String ftpPassword = "myPassword";
    System.setProperty("socksProxyHost" ,"10.148.0.131");
    System.setProperty("socksProxyPort", "1080");
    FTPClient ftpClient = new FTPClient();
    try {
    System.out.println("connecting");
    ftpClient.connect(ftpHostName, ftpPort);
    System.out.println("connected");
    System.out.println("loging in");
    boolean successLogin = ftpClient.login(ftpUserName, ftpPassword);
    if(successLogin)
    System.out.println("success login");
    else
    System.out.println("fail login");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    System.out.println("loging out");
    ftpClient.logout();
    System.out.println("disconecting");
    ftpClient.disconnect();
    catch (Exception e) {
    e.printStackTrace();
    I am getting the following error:
    C:\temp\ftp\test>java.exe -cp ./commons-net-ftp-2.0.jar;. MyTest connecting
    java.net.SocketException: Malformed reply from SOCKS server
    at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
    at java.net.SocksSocketImpl.connectV4(SocksSocketImpl.java:265)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:437)
    at java.net.Socket.connect(Socket.java:519)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
    at MyTest.main(MyTest.java:23)
    loging out
    java.lang.NullPointerException
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:471<ftp://FTP.java:471>)
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534<ftp://FTP.java:534>)
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583<ftp://FTP.java:583>)
    at org.apache.commons.net.ftp.FTP.quit(FTP.java:794<ftp://FTP.java:794>)
    at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:697)
    at MyTest.main(MyTest.java:39)
    I am able to do this using a different FTP client library, ftp4j-1.5.1<ftp://ftp4j-1.5.1> using the following code:
    import it.sauronsoftware.ftp4j.FTPClient;
    import it.sauronsoftware.ftp4j.connectors.SOCKS4Connector;
    public class MyTestFtp4J {
    public static void main(String[] args) {
    String ftpHostName = "ftp.xxx.com";
    int ftpPort = 21;
    String ftpUserName = "myUserName";
    String ftpPassword = "myPassword";
    FTPClient ftpClient = new FTPClient();
    ftpClient.setConnector(new SOCKS4Connector("10.148.0.131", 1080));
    try {
    System.out.println("connecting");
    ftpClient.connect(ftpHostName, ftpPort);
    System.out.println("connected");
    System.out.println("loging in");
    ftpClient.login(ftpUserName, ftpPassword);
    System.out.println("success login");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    try {
    System.out.println("disconecting");
    ftpClient.disconnect(true);
    catch (Exception e) {
    e.printStackTrace();
    So I know the proxy settings are correct.
    The java version I used to compile and run my apps is 1.6.0_06 Does anyone can help figure out what is wrong when I use the Apache commons net FTP client?
    Thank you
    Jon

    Is the old AirPort Extreme base station (AEBS)
    configured so that the option to distribute IP
    addresses is DISABLED? If so, configure the new AEBS
    to act as a bridge.
    Are you suggesting I use a set-up with TWO AEBSs? Set up a bridge (not sure how) and then use the old AEBS to connect to the DSL modem and broadcast to the new Extreme which will then be the router to the other computers on the network?
    Do you have any port mapping or default host enabled
    on the old AEBS?
    I do not understand, not do I see these options in the Base Station utitlity; perhaps they are in the FTP options--but that, I'm sorry to say, is not obvious to my inspection.
    Duane, can you give me a few more basic instructions? Thanks
    iMac 17    

  • Finder is not displaying some folders and files

    Most folders and files are displaying properly, but some are missing.  I can find them by typing their names into the search window, but they are not displaying automatically in Finder.

    Hello Andy_fan
    Please look for MS-SMB_ServerUserGuide.docx file in the folder where you extracted MS-SMB.zip file and refer section 'Configure the SUT' for configuring SUT. Follow other relevant sections of this document to configure client as well.
    Domain is not a requirement for running SMB test suite, hence, if you are in workgroup environment just ignore domain values in the
    ParamConfig.xml
    file.
    Thanks
    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

  • Textedit not displaying all text in files?

    This is an odd one - I opened a rtf file in text edit that I've added text to every month or so for the last year - and out of the blue, it looks like half my text is missing from the file. Thankfully, I think, I have a TC and have several hundred iterations of this file - I call up Time Machine and each iteration is missing the text as well! But, apparently eyes can be decieving - after presuming this was a major issue with TC and getting myself paranoid, I opened the file up in pico, a terminal based editor - and lo, all the text was there.
    I've opened the file in Pages, Text Edit and even Omni Outliner and it will not show - what's going on? I've copied and pasted the text that was missing from terminal but I fear that this'll happen again - how can I avoid this?

    I've opened the file in Pages, Text Edit and even Omni Outliner and it will not show
    Can you select it? Could it have gotten colored white somehow?

  • Apache Commons Net - Retrieve File - Extension, Compare , Move - FTP Server

    Dear All,
    I am using Apache Commons net FTP Library for FTP Operations. I had a few doubts
    1) I like to retrieve ftp files only with some extensions like *.txt or *.jpg etc. How can we retrieve files with specifying file extension?
    2) I need to compare the FTP Files with the local files before downloading from the FTP Server?
    3) I need to move files from the ftp server to local directory. Is there is anyway to move the files rather than first retrieve files from the FTP Server and then deleting the file in the FTP Server using FTP delete()
    Thanks,
    J.Kathiresan

    1) I like to retrieve ftp files only with some
    extensions like *.txt or *.jpg etc. How can we
    retrieve files with specifying file extension?
    List the files and then filter the list to those that you want to process.
    2) I need to compare the FTP Files with the local
    files before downloading from the FTP Server?Think about this one! To compare two files you nead to read both. If you do this on the client then you will have to copy the file from the server first!
    >
    3) I need to move files from the ftp server to local
    directory. Is there is anyway to move the files
    rather than first retrieve files from the FTP Server
    and then deleting the file in the FTP Server using
    FTP delete()What is wrong with copy then delete?

  • Apache commons-net

    Hi
    I was using apache commons-net to FTP some files to an FTP server.
    I was able to login to the server. I want to know How can I move out from my root directory. Is it possible using apche coomons-net. The working directory displayed is only /home/myname.
    Thanks
    Prabhath Nair

    If you want to move to a sub-directory within your current root then could it possibly be the changeWorkingDirectory() command?
    P.S. You wont be able to move to some directory such as /etc because FTP servers constrain you to stay within a fixed root directory. Often, the home directory of the login name.

  • Finder not displaying all files in remote directory

    Sorry, this is a repost as I have gotten no response from my original request here: Finder not displaying all files in remote directory
    I've exported pictures from iPhoto on my iMac to a shared directory on my mac mini. When I access that directory from my iMac, I can see some but not all of the pictures. I know the pictures exported properly because I can see them all from the mac mini. I can open up a terminal window on my iMac and see all of the files; I can also open those files from the terminal.
    I'm running OSX 10.9.4 on both computers, with the mac mini also running OSX Server. I've placed a screen grab below from my iMac of what Finder sees vs what I can see from the terminal.
    Why isn't Finder displaying all of my files?

    thanks for responding
    Adding a new file to the shared folder results in me being able to see the new file from my clients regardless of where it was added from, however the "hidden" files do not suddenly pop up.
    I tried a few more experiments that had interesting results, but still didn't lead me to an answer.
    First I tried copying the files from the remote directory to a local directory; I did this in 2 different ways and had different results. Method A) I copied files from the mounted share to a local dir: "cp /Volumes/MyShare/dir/*.JPG .". Method B) I copied the files using secure copy: "scp user@server:/path/to/dir/*.JPG .".
    Method A resulted in Finder not being able to see the files in the local directory, while Method B did. This was interesting and lead me to suspect an issue with the way I am sharing the directory on the server. From Server settings I have both afp and smb checked. I tried enabling only one or the other and reconnecting; but this did not fix the problem.
    Next I tried exporting the photos from iPhoto again. Exporting them locally results in files that Finder can see. Exporting them to my server results the same bad behavior
    Getting desperate, I also tried renaming all of the files from "*.JPG" to "*.jpg" but this didn't help.
    One last experiment, I see the same behavior from both another Mac and a PC on my local network... FTP works fine.
    Any more ideas?

  • Form does not display all records from table

    Hi guys
    I modified one form that was based on a signle DB table. I removed certain fields from the table and added some extra fields to that table. Then based on the new table I also modified the form and removed the text items related to old fields in the table and added new text items pointing to the new fields now. II have checked all the new items properties and they have don't seem to be wrong or so. But now the problem is the form does not display all the records from the table. before it used to display all records from the table when qureied but not now. It only certain records from the table containing all new data and also old data but the form does not display other records though I don't see any obvious discrepancy. Remember that the before doing the modifications, I have table back for the old, created another table that contained new records for the new fields, and then I inserted the old records and updated the new table data in the new table with these new table values. So this way I have got my new table. Could someone help why the new modified form fails to display all records from the new table updated table though it display some of them successfully.
    Any help will be appreciated.
    Thanks

    hi
    Set the block property of "Query All Records" to "YES"
    hope it will work.
    Faisal

  • DWMX Not Displaying All Files

    Hello folks. This is my last attempt to locate a solution for
    why my DWMX is not displaying all my files in my local or remote
    folder. I have a new client who has put us in charge of moving
    their site to a new server. When I create a new site in DWMX, it
    allows me to download and upload just fine, ALL of the site.
    Problem is, DWMX will only display a certain number of files in
    both the local and remote views. In my windows explorer, it shows
    all the files, on the new server it shows all the files, but DWMX
    will not. The folder in question is the dumping ground for all
    their self-managed content images for their site. So it is hard to
    split these up into multiple folders and expect the code to work
    properly.
    Has anyone else experienced this problem? If so, is there a
    solution to this problem with DWMX?
    Thank you.

    Are you using DMX6.0 or DMX6.1? If the former, please update
    to the latter
    at your earliest opportunity - use the updater on the Adobe
    site, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "csnetworks" <[email protected]> wrote in
    message
    news:fai93r$hj$[email protected]..
    > Hello folks. This is my last attempt to locate a
    solution for why my DWMX
    > is
    > not displaying all my files in my local or remote
    folder. I have a new
    > client
    > who has put us in charge of moving their site to a new
    server. When I
    > create a
    > new site in DWMX, it allows me to download and upload
    just fine, ALL of
    > the
    > site. Problem is, DWMX will only display a certain
    number of files in
    > both the
    > local and remote views. In my windows explorer, it shows
    all the files,
    > on the
    > new server it shows all the files, but DWMX will not.
    The folder in
    > question is
    > the dumping ground for all their self-managed content
    images for their
    > site.
    > So it is hard to split these up into multiple folders
    and expect the code
    > to
    > work properly.
    >
    > Has anyone else experienced this problem? If so, is
    there a solution to
    > this
    > problem with DWMX?
    >
    > Thank you.
    >

  • Status bar of Oracle from runtime applet is not displaying all of a sudden

    Hello,
    The status bar of Oracle form runtime applet is not displaying all of a sudden..It was displaying before but now its not......It helps me to see errors......how can I restore it?

    My console was set to a specific window name..it was not null at all....but the status bar wont show...
    But I solved it ...by changing the applet size...
    Applet container size is controlled by the HEIGHT and WIDTH parameters in the formsweb.cfg. To maximize the applet area to the size of the browser, do the following:
    HEIGHT=100%
    WIDTH=100%
    Thank you all for your help and support...
    Edited by: user10746194 on Feb 11, 2010 6:33 AM

  • I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.   Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.
    Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • I have just installed iPhoto 11 and all of photos on my iphone have now all disappeared and ended up in my photo stream and the library in iphoto does not display all my pictures?? Can anyone help?

    I have just installed iPhoto 11 and all of photos on my iphone have now all disappeared and ended up in my photo stream and the library in iphoto does not display all my pictures?? Can anyone help?

    And I cant work out why all of my pictures are not diplaying in iphoto?
    Is this iPhoto on your Mac?  Are you referring to the photos that were in your iPhoto LIbrary prior to the upgrade to iPhoto 11?  If so then apply the two fixes below in order as needed:
    Fix #1
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - run Option #4 to rebuild the database.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button and select the library you want to add in the selection window..
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    If that's not what you're referring to then you should describe what is happening in more detail. Remember we can't see your Mac or your iPhone so need detailed and accurate descriptions of what you're experiencing.
    Also we need infomartion like do you have an iCloud account and are you logged into it on all of your devices, iPhoto and Mac? do you have Photo Stream enabled on both.
    OT

  • Photo App does not display all photos

    Running iOS 7.0.4 on an iPhone 4S. The new Photo App does not display all photos properly. All photos show up as thumbnails. However, when you tap on some of them, only a blank page is displayed. The rest is fine. This issue started after the upgrade to iOS 7. Is this a bug? Hardware-related?

    Upon closer inspection it appears that the missing photos are in a folder called IPhoto Library.  This folder is greyed out when I choose the import folder.
    When I use 'show package contents' it reveals the missing photos (below).  Why is my iphoto library so scrambled!  Thanks for any insight.

  • Query not displaying all records when execute it first tme

    Hello,
    i have an issue with the WEBI report.when i run  the report first time it's displaying only few records, but when i run the same report second time it's displaying the more records and it's correct.
    Could any one tell me why it's not displaying all records when i execute first time.
    Thanks in advance for your help.
    Regards,
    Prathap

    Which BOBJ version do you use?
    Which kind of data source are you retrieving data from?
    Regards,
    Stratos

  • Filter not displaying all values

    When I attempt to filter a product code. the drop down list (under heading Expression) displays about 100 codes when in reality there are about 2000 values.
    I have changed the Maximum Rows per Page under Search Bar to 2000, but this still does not display all the codes.
    Is there a setting I am missing?

    I think that your description of the problem doesn't help a lot. Are you using interactive reports?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • How do you know what generation your Apple TV is?

    How can you tell what generation your Apple TV is and what the version IOS it is running? Thanks for any help!

  • Unloading external swf file keeps memory usage growing up

    Hello everybody, The idea is very simple: I have a submain.swf with 5 buttons. Each button loads an external .swf file. com_loader.load(URLRequest); After playing first external swf, before I go to next one, I try to unload it: 1. remove all its asso

  • Bbc wants me to install flash player. What do I do?

    I wanted to watch Wimbledon in the garden with my ipad mini. The bbc site wants me to install flash. Whereas I am used to that with my old .pC I am not sure about Apple add ons.  Please advise as I would rather be safe!

  • SAP ECC 6.0 on Linux  OS

    Hello to all,                 I'm new to SAP world and would like to install SAP ECC 6.0 SR1 or SR2 on linux platform with Oracle as Database. I'm not sure how to search for software into the market place, what are the notes to refer. Would be great

  • How can I restore my settings, etc. after update to Firefox 20 reset everything?

    Windows 7 Starter, Firefox 20; running from non-administrator account (possibly the cause of issues): I updated to Firefox 20, and everything was reset (i.e. homepage, bookmarks, passwords, addons). I searched online for solutions but it hasn't helpe