Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Questions About CFtpFileFind Class

Questions About CFtpFileFind Class

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionlearning
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jdnx
    wrote on last edited by
    #1

    There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!

    A D 2 Replies Last reply
    0
    • J jdnx

      There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!

      A Offline
      A Offline
      Aamir Butt
      wrote on last edited by
      #2

      I had problems with this as well when I was using this function. I figured out that apparently this function fails when there is a space in the name of file/directory. Check out for this. Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles

      J 1 Reply Last reply
      0
      • J jdnx

        There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        jdnx wrote: but in other sites it will return some "." ".." dirs and lost some dirs. Some OSs support the . and .. convention while others do not. jdnx wrote: ...I called CInternetFile's GetLength Function but it can not return correct file length,also very strange... Not all FTP software running on the server has implemented the "length" function.


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        1 Reply Last reply
        0
        • A Aamir Butt

          I had problems with this as well when I was using this function. I figured out that apparently this function fails when there is a space in the name of file/directory. Check out for this. Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles

          J Offline
          J Offline
          jdnx
          wrote on last edited by
          #4

          First Thank you for help Then If what you said is right,Does that mean using this method I can not deal with those files/dirs with a space in its name,No Alternative ways??

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups