by LPChip (7 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sun 5th November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
The easyest way to get the filename from a full path(1 row) and the path (2 rows)
PathAndFilename = "C:\windows\command.com"
File_Name = Dir(PathAndFilename)
'and retrieving the path:
PathAndFilename = "C:\windows\command.com"
File_Name = Dir(PathAndFilename)
Path = Left(File_Name, Len(PathAndFilename) - Len(File_Name))
'Dir("C:\Windows\command.com") is possible too (1 row)
'File_Name = Dir("C:\Windows\command.com")
'Path = Left(File_Name, Len("C:\Windows\command.com") - Len(File_Name)) (2 rows)
No comments have been posted about The easyest way to get the filename from a full path(1 row) and the path (2 rows). Why not be the first to post a comment about The easyest way to get the filename from a full path(1 row) and the path (2 rows).