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. Visual Basic
  4. Getting CD name and file list in VB.net

Getting CD name and file list in VB.net

Scheduled Pinned Locked Moved Visual Basic
csharptutorialquestion
3 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.
  • J Offline
    J Offline
    Julien Burgaud
    wrote on last edited by
    #1

    Does anybody know how to get the cd name, (volume name) and to get the files list in the directory? to pass it in a dataset...

    M 1 Reply Last reply
    0
    • J Julien Burgaud

      Does anybody know how to get the cd name, (volume name) and to get the files list in the directory? to pass it in a dataset...

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hi Julien. Well, you can look at the FileInfo.Name[^] documentation for an example of getting the list of files in a directory. The Dir() function, though a carryover from VB6, is also available in the Microsoft.VisualBasic namespace. As for the volume name, you could try this (where E:\ is your CD drive):

      Dir("E:\", FileAttribute.Volume)

      or I suppose you could add a reference to the Microsoft Scripting Runtime in your vb.net project and use the FileSystemObject's GetDrive() method.

      J 1 Reply Last reply
      0
      • M Mike Ellison

        Hi Julien. Well, you can look at the FileInfo.Name[^] documentation for an example of getting the list of files in a directory. The Dir() function, though a carryover from VB6, is also available in the Microsoft.VisualBasic namespace. As for the volume name, you could try this (where E:\ is your CD drive):

        Dir("E:\", FileAttribute.Volume)

        or I suppose you could add a reference to the Microsoft Scripting Runtime in your vb.net project and use the FileSystemObject's GetDrive() method.

        J Offline
        J Offline
        Julien Burgaud
        wrote on last edited by
        #3

        Thanks for your help Julien

        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