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. Is there any other way....

Is there any other way....

Scheduled Pinned Locked Moved C / C++ / MFC
helpsysadmin
6 Posts 4 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.
  • A Offline
    A Offline
    Anamika2005
    wrote on last edited by
    #1

    I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha

    C D 2 Replies Last reply
    0
    • A Anamika2005

      I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why don't you work out why it's returning false, and fix it ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      A 1 Reply Last reply
      0
      • C Christian Graus

        Why don't you work out why it's returning false, and fix it ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        A Offline
        A Offline
        Anamika2005
        wrote on last edited by
        #3

        Thanks for your immediate reply... its showing ERROR_FILE_NOT_FOUND when i try to fix it using the GetLastError() but i cannot able to find out the reason.. why it need to find the file on the ftp server it should just get store the specified local file on the server side.... Thanks Shikha

        C 1 Reply Last reply
        0
        • A Anamika2005

          Thanks for your immediate reply... its showing ERROR_FILE_NOT_FOUND when i try to fix it using the GetLastError() but i cannot able to find out the reason.. why it need to find the file on the ftp server it should just get store the specified local file on the server side.... Thanks Shikha

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Perhaps it can't find the local file ? Or you don't have permission to create the file, so it's not found when it tries to write to it ?

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          1 Reply Last reply
          0
          • A Anamika2005

            I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha

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

            Shikha Jain wrote:

            The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )...

            Why was the local file not found? Without seeing the relevant code, a helpful answer is going to be a guess at best.


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            V 1 Reply Last reply
            0
            • D David Crow

              Shikha Jain wrote:

              The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )...

              Why was the local file not found? Without seeing the relevant code, a helpful answer is going to be a guess at best.


              "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

              "Judge not by the eye but by the heart." - Native American Proverb

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

              HI Shikha!!! Are u passing the correct path of the file to be uploaded in the CFtpConnection::PutFile() function??? i am new to programming but i had developed a FTP client just a couple of months back.. so, i want u to see if you are passing the correct path in the PutFile() function. and like what Sir David Crow said, without having a look at ur code, we may not be able to give u the correct suggestions.. so, just see if u can post the sample of ur code... i used the following lines of code to upload a file called as 'test.txt' residing on my 'C' drive.the file will be stored as 'ftptest.txt' on the FTP server. //Create a session variable and get a pointer to the FTP connection.. CInternetSession sess(_T("MyFtpModule")); CFtpConnection* pConnect = NULL; //use pConnect to Connect to the server pConnect = sess.GetFtpConnection(_T(/*pass the parameters here*/)); //when the connection is established,use PutFile() to upload BOOL bUploaded = pConnect->PutFile("C:\\test.txt","ftptest.txt",FTP_TRANSFER_TYPE_ASCII,1); I want others to correct if i am wrong..

              Regards, vijay Aroli.

              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