by Tom Parkison (8 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 7th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Gets only the file name minus the extention of a file name up to 1 million characters long.
Dim i As Long
For i = 0 To 1000000
If Right(Left(FileName, i), 1) = "." Then
If WithDot = False Then
GetFileName = Left(FileName, i - 1)
Else
GetFileName = Left(FileName, i)
End If
Exit Function
End If
Next
End Function
---=== How to Use ===---
' To get the file name with the dot at the right
variable = GetFileName(FILENAME, True)
' To get the file name without the dot at the right
variable = GetFileName(FILENAME, False)
No comments have been posted about Gets only the file name minus the extention of a file name up to 1 million characters long.. Why not be the first to post a comment about Gets only the file name minus the extention of a file name up to 1 million characters long..