Use Dir function to get the file directory
Sub DirDemo() Dim FType As String FType = "*.xls" MsgBox Dir(FType) End Sub
1. | Dir() Returns a string representing the name of a file or directory with specified pattern. | ||
2. | Get Directory by using the Dir function | ||
3. | Get the file names | ||
4. | Validate the file path |