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. Get remote file properties (FTP)

Get remote file properties (FTP)

Scheduled Pinned Locked Moved C / C++ / MFC
comhelp
2 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.
  • C Offline
    C Offline
    chetanjoshi9
    wrote on last edited by
    #1

    am working on FTP wizard I written a code to get the properties of selected file for local drive as HTREEITEM hlocalselitem = m_LocaleTreeCtrl.GetSelectedItem(); { CString selectedPath =GetLocalTreePath (hlocalselitem); HWND hwnd = GetSafeHwnd(); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ; ShExecInfo.hwnd = hwnd; ShExecInfo.lpVerb = "properties"; ShExecInfo.lpFile = selectedPath; ShExecInfo.lpParameters = ""; ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_SHOW; ShExecInfo.hInstApp = NULL; ShellExecuteEx(&ShExecInfo); } which works fine. But when I used it for remote file i.e. selectedpath is different as i.e. using '/' but it is giving me error as please check the path I also tried for complete URL then it gives invalid parameter for ShExecInfo.lpFile = selectedPath; path is : "ftp://www.ganitra.com//BannerTestPlan.jpg"

    J 1 Reply Last reply
    0
    • C chetanjoshi9

      am working on FTP wizard I written a code to get the properties of selected file for local drive as HTREEITEM hlocalselitem = m_LocaleTreeCtrl.GetSelectedItem(); { CString selectedPath =GetLocalTreePath (hlocalselitem); HWND hwnd = GetSafeHwnd(); SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ; ShExecInfo.hwnd = hwnd; ShExecInfo.lpVerb = "properties"; ShExecInfo.lpFile = selectedPath; ShExecInfo.lpParameters = ""; ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_SHOW; ShExecInfo.hInstApp = NULL; ShellExecuteEx(&ShExecInfo); } which works fine. But when I used it for remote file i.e. selectedpath is different as i.e. using '/' but it is giving me error as please check the path I also tried for complete URL then it gives invalid parameter for ShExecInfo.lpFile = selectedPath; path is : "ftp://www.ganitra.com//BannerTestPlan.jpg"

      J Offline
      J Offline
      JudyL_MD
      wrote on last edited by
      #2

      For <insert deity of choice>'s sake - it was only half an hour since your last request, in a different thread!! This is a volunteer site with people who do other things for a living. Be patient. And don't open a duplicate thread. <end lecture on forum etiquette>

      chetanjoshi9 wrote:

      path is : "ftp://www.ganitra.com//BannerTestPlan.jpg"

      anyway, you don't need double slashes (//) if it is a forward slash. Doubles slashes are only needed in the string if you use a backward slash i.e. use either "ftp:/www.ganitra.com/BannerTestPlan.jpg" or "ftp:\\www.ganitra.com\\BannerTestPlan.jpg" Technically, Windows uses the backward slash although some of the APIs will accept forward slashes. I don't know off-hand if the one you're trying to use accepts / so try changing to \\. Judy

      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