I am trying to request an input file from the user. However I only want the filename itself, whereas RequestFile returns the filename with path. In other words, I want "file.txt" but RequestFile returns "C:\My Documents\file.txt"
Is there any way to use RequestFile so that it only returns to filename without path? Or is there any way to manipulate the returned string to trim out the path?
ADDITION: Still curious if there is a better way but I just snagged this code out of BBGui to trim the filename.
Function TrimFilename$(path$)
For a=Len(path) To 1 Step -1
byte$=Mid(path,a,1)
If byte="\"
Return Right(path,Len(path)-a)
EndIf
Next
End Function
Is there any way to use RequestFile so that it only returns to filename without path? Or is there any way to manipulate the returned string to trim out the path?
ADDITION: Still curious if there is a better way but I just snagged this code out of BBGui to trim the filename.
Function TrimFilename$(path$)
For a=Len(path) To 1 Step -1
byte$=Mid(path,a,1)
If byte="\"
Return Right(path,Len(path)-a)
EndIf
Next
End Function