VB 6.0 to VB.Net 2005
-
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...
-
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...
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.
-
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...
Have a look at: DirectoryInfo.GetFiles Method [^]
The need to optimize rises from a bad design.My articles[^]