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. Problem in saving Files and Folders

Problem in saving Files and Folders

Scheduled Pinned Locked Moved C / C++ / MFC
helpsysadminlinuxdata-structuresquestion
6 Posts 2 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.
  • V Offline
    V Offline
    vijay_aroli
    wrote on last edited by
    #1

    hello everyone, i am trying to save some files and folders onto a FTP server. i can successfully create the tree structure of the files and folders onto an FTP running Windows. but the operation fails when i try to save the same tree structure onto an FTP server running Linux on it. may be the CFtpConnection:: CreateDirectory() function works only on the FTP servers running windows Operation System on it, is it??? i am not sure. can anyone please help me. Thanks..

    vijay.

    M 1 Reply Last reply
    0
    • V vijay_aroli

      hello everyone, i am trying to save some files and folders onto a FTP server. i can successfully create the tree structure of the files and folders onto an FTP running Windows. but the operation fails when i try to save the same tree structure onto an FTP server running Linux on it. may be the CFtpConnection:: CreateDirectory() function works only on the FTP servers running windows Operation System on it, is it??? i am not sure. can anyone please help me. Thanks..

      vijay.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      vijay7173 wrote:

      FTP server running Linux on it

      There's your problem right there ;) Seriously, though, are you getting an error returned from CreateDirectory()? Are you specifying a correct/appropriate path?

      V 1 Reply Last reply
      0
      • M Mark Salsbery

        vijay7173 wrote:

        FTP server running Linux on it

        There's your problem right there ;) Seriously, though, are you getting an error returned from CreateDirectory()? Are you specifying a correct/appropriate path?

        V Offline
        V Offline
        vijay_aroli
        wrote on last edited by
        #3

        Mark Salsbery wrote:

        are you getting an error returned from CreateDirectory()?

        yes sir.the CreateDirectory() returns 0.:( more over it returns with an error code of 12003 :omg: and i am not able to make out what exactly the error is about.

        Mark Salsbery wrote:

        Are you specifying a correct/appropriate path?

        yes, i am giving the correct path. the problem is that, i am sometimes successful in saving the tree to the FTP server with Linux running on it. but the Hierarchy is not preserved. i.e, the entire tree is saved at a same level. eg: a file with path, say, /root/folder1/folder2 the directory folder2 is created and saved under root folder, where as it should be saved in folder1(which is in turn saved under root). i have checked the path and i am sure that i am giving the right path. i even made sure to see that the path is not modified in between. can i know what i should do to make my tree save to be saved onto the FTP server with Linux on it??? I am using the member functions of CFtpConnection class. should i use any alternatives(if there are any)??:confused:

        vijay.

        M 1 Reply Last reply
        0
        • V vijay_aroli

          Mark Salsbery wrote:

          are you getting an error returned from CreateDirectory()?

          yes sir.the CreateDirectory() returns 0.:( more over it returns with an error code of 12003 :omg: and i am not able to make out what exactly the error is about.

          Mark Salsbery wrote:

          Are you specifying a correct/appropriate path?

          yes, i am giving the correct path. the problem is that, i am sometimes successful in saving the tree to the FTP server with Linux running on it. but the Hierarchy is not preserved. i.e, the entire tree is saved at a same level. eg: a file with path, say, /root/folder1/folder2 the directory folder2 is created and saved under root folder, where as it should be saved in folder1(which is in turn saved under root). i have checked the path and i am sure that i am giving the right path. i even made sure to see that the path is not modified in between. can i know what i should do to make my tree save to be saved onto the FTP server with Linux on it??? I am using the member functions of CFtpConnection class. should i use any alternatives(if there are any)??:confused:

          vijay.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          vijay7173 wrote:

          more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.

          INFO: WinInet Error Codes (12001 through 12156)[^] 12003 ERROR_INTERNET_EXTENDED_ERROR An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text. What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?

          V 1 Reply Last reply
          0
          • M Mark Salsbery

            vijay7173 wrote:

            more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.

            INFO: WinInet Error Codes (12001 through 12156)[^] 12003 ERROR_INTERNET_EXTENDED_ERROR An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text. What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?

            V Offline
            V Offline
            vijay_aroli
            wrote on last edited by
            #5

            Mark Salsbery wrote:

            What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?

            well sir, the server connected me to the Root Directory (i.e, '/'). and every time i use CFtpConnection::SetCurrentDirectory() to set the directory when i am supposed change it.

            vijay.

            M 1 Reply Last reply
            0
            • V vijay_aroli

              Mark Salsbery wrote:

              What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?

              well sir, the server connected me to the Root Directory (i.e, '/'). and every time i use CFtpConnection::SetCurrentDirectory() to set the directory when i am supposed change it.

              vijay.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              Hmmm I don't know. Can you post the code you use? Have you tried InternetGetLastResponseInfo() to see if there's a meaningful error message?

              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