Quantcast
Channel: How to get the file name of a file in VB? - Stack Overflow
Browsing index pages (4 articles)

How to get the file name of a file in VB?

I make a search program for searching a list of files in a computer and then copy the file into a store folder. The file name could be "*11*2.txt" As long as the program find this pattern, it should...

View Article


Answer by Heinzi for How to get the file name of a file in VB?

To answer your question: You can get the file name with Path.GetFileName. Example:Dim fileName As String = Path.GetFileName(foundFile)However, there's a bunch of other things wrong with your...

View Article


Answer by Tim Schmelter for How to get the file name of a file in VB?

First, you should check if ToPath is a valid directory since it's coming from a TextBox:Dim isValidDir = Directory.Exists(ToPath)Second, you can use Path.Combine to create a path from separate...

View Article

Answer by Shehan Sachintha for How to get the file name of a file in VB?

In vb.net, I'm using the following code to find the filenameTextbox1.Text = New FileInfo(OpenFileDialog.FileName).Namethis code work fine with open file dialog box

View Article
Browsing index pages (4 articles)


Latest Images