• Recent Posts

  • Meta

  • Tags

    #ziplib .net getfilename .net no titlebar 7-zip adding a splash screen in visual basic.net adding textbox autocomplete addition adjusttokenprivileges adware application filename application position applications path audio library autocomplete autocomplete combobox avi mpg basic math bass.dll bass sound system beep benchmark data calculator cdrom tray change unix to windows directory exists disable beep on enter doevents excel file exists getinputstate high cpu usage linq mcisendstring no doevents open webpage pinging play mp3 play wave scroll textbox shell stop beep on enter textbox vb ping visual studio windows mci
  • Extract and get/retrieve the Filename only from a path – VB.NET

    Monday, September 24th, 2007

        One Way to do It ' 'This will extract and return the filename from the specified path and filename. ' Dim filePath As String = "c:\MyDirectory\MYFile.txt" Dim slashPosition As Integer = filePath.LastIndexOf("\") Dim filenameOnly As String = filePAth.Substring(slashPosition + 1) MsgBox(filenameOnly)         Second Way to do It ' 'Thanks to Jim for [...]