Use a FileInfo object to resolve relative path names in Visual Basic .NET

Started by nandagopal, Nov 17, 2008, 07:28 PM

Previous topic - Next topic

nandagopal

The FileInfo object represents information about a file. The following code creates a new FileInfo object, using the relative path entered in the txtRelativePath text box in the constructor. It then displays the file's resolved name returned by the object's FullName property.


Dim file_info As New FileInfo(txtRelativePath.Text)
txtResolvedPath.Text = file_info.FullName