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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. getting contents from USB drive letter

getting contents from USB drive letter

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
7 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.
  • S Offline
    S Offline
    Subrat Patnaik
    wrote on last edited by
    #1

    Hi all, is it possible to get the contents of a drive i.e the list of all files and folders inside the drive ? i have the drive letter with me. so please can i get some help to get all the contents inside the drive ??? Thank You

    _ L 2 Replies Last reply
    0
    • S Subrat Patnaik

      Hi all, is it possible to get the contents of a drive i.e the list of all files and folders inside the drive ? i have the drive letter with me. so please can i get some help to get all the contents inside the drive ??? Thank You

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Are you looking for WIN32_FIND_DATA in conjunction with FindFirstFile and FindNextFile?

      I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

      S 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Are you looking for WIN32_FIND_DATA in conjunction with FindFirstFile and FindNextFile?

        I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

        S Offline
        S Offline
        Subrat Patnaik
        wrote on last edited by
        #3

        Not exactly... however..could it be elaborated a bit on how to get the first, next or last file from a drive, where the drive letter is known?

        D 1 Reply Last reply
        0
        • S Subrat Patnaik

          Not exactly... however..could it be elaborated a bit on how to get the first, next or last file from a drive, where the drive letter is known?

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

          Subrat Patnaik wrote:

          ...could it be elaborated a bit on how to get the first, next or last file...

          Based on what criteria?

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          S 1 Reply Last reply
          0
          • S Subrat Patnaik

            Hi all, is it possible to get the contents of a drive i.e the list of all files and folders inside the drive ? i have the drive letter with me. so please can i get some help to get all the contents inside the drive ??? Thank You

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            FindFirstFile/FindFirstFileEx/FindNextFile should do that. Just pass the appropriate filter; I guess it's "X:\*" :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            1 Reply Last reply
            0
            • D David Crow

              Subrat Patnaik wrote:

              ...could it be elaborated a bit on how to get the first, next or last file...

              Based on what criteria?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Man who follows car will be exhausted." - Confucius

              S Offline
              S Offline
              Subrat Patnaik
              wrote on last edited by
              #6

              As i have already said the criteria is we have the drive letter. That's all.... now we need to get all the files and folders within it.

              D 1 Reply Last reply
              0
              • S Subrat Patnaik

                As i have already said the criteria is we have the drive letter. That's all.... now we need to get all the files and folders within it.

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

                Use the FindFirstFile()/FindNextFile() pair.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Man who follows car will be exhausted." - Confucius

                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