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. VB 6.0 to VB.Net 2005

VB 6.0 to VB.Net 2005

Scheduled Pinned Locked Moved Visual Basic
csharphelp
3 Posts 3 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
    Shazz Rock
    wrote on last edited by
    #1

    Dim fso As New FileSystemObject Dim source as String source = "D:\New" For Each File In fso.GetFolder(source).Files code next this returns number and respective file details in vb 6.0 How the above code can be executed in vb.net 2005 Here File is not declared in vb6.0 Please help... Thanx in advance

    Shazz here to help you...

    C W 2 Replies Last reply
    0
    • S Shazz Rock

      Dim fso As New FileSystemObject Dim source as String source = "D:\New" For Each File In fso.GetFolder(source).Files code next this returns number and respective file details in vb 6.0 How the above code can be executed in vb.net 2005 Here File is not declared in vb6.0 Please help... Thanx in advance

      Shazz here to help you...

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

      No VB6 code is going to work in VB.NET, it's a whole new language. System.IO is the namespace you need. Directory.GetFiles will get you the files in a directory. Or Folder.GetFiles, one or the other, I forget. Then the FileInfo class is how you get info about a file, such as it's size and last modified date.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • S Shazz Rock

        Dim fso As New FileSystemObject Dim source as String source = "D:\New" For Each File In fso.GetFolder(source).Files code next this returns number and respective file details in vb 6.0 How the above code can be executed in vb.net 2005 Here File is not declared in vb6.0 Please help... Thanx in advance

        Shazz here to help you...

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #3

        Have a look at: DirectoryInfo.GetFiles Method [^]

        The need to optimize rises from a bad design.My articles[^]

        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