I want to show the directory but the messagebox show this: system.__ComObject
Public Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
filesystem = CreateObject("Scripting.FileSystemObject")
ThisDir = filesystem.GetFolder("F:\-=Temporal=-\Documentos\DVD Temazos\")
'1st try
MessageBox.Show(ThisDir.ToString())
'2nd try
Dim a As String = CType(ThisDir, String)
MessageBox.Show(a)
end sub
What i’m doing wrong?
thankyou
If you really want to work with the FileSystemObject, you have to call the
Nameproperty to get the name of the folder:But i would recommend to use the .NET classes in the namespace
System.IOlikeSystem.IO.Directory