View Single Post
Old 24-04-2007, 07:10 PM   #9
jg007
Super Freak
 
jg007's Avatar

 
Join Date: Feb 2007
Location: Peterlee, England
Posts: 169
Default

<div class='quotetop'>QUOTE(Reup @ Apr 24 2007, 07:30 AM) [snapback]288251[/snapback]</div>
Quote:
That's what the Path-class takes care of. You know Path.GetFileName of Path.GetFileNameWithoutExtension etc. Check out the full range @ http://msdn2.microsoft.com/en-us/library/s...ers(vs.71).aspx
(this is .NET 1.1 version, since I don't know against which framework you're programming).
[/b]

doh!, i have never really used VB to this level but finally managed a working code, although it is not quite as yours seems to be it seems to work -

(Visual Basic Express 2005 )

Code:
Dim WAD As System.IO.FileInfo

OpenFileDialog1.Filter = "Wad Files|*.*"
********OpenFileDialog1.Title = "Select The WAD You Wish To Add"
********If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
************WAD = My.Computer.FileSystem.GetFileInfo(OpenFileDialog1.FileName)
************MsgBox(WAD.Name)
************MsgBox(WAD.DirectoryName)
jg007 is offline                         Send a private message to jg007
Reply With Quote