K
kidkosmo
Hi, Gang,
I am looking for help in parsing out a file name from a file path.
I'm using the GetOpenFile api for users to choose the file path, which
is what I'm using for a web form to upload the file to a wiki page;
however, I also want to extract just the file name. So, in the
example below, I want to return a string value of just "History.mdb"
and save that in my table (after the upload, I no longer need the
entire path).
C:\Documents and Settings\me\My Documents\History.mdb
I have tried using the following formula: strfile = Right$
(strFilename, Len(strFilename) - InStr(1, strFilename, "\") - 1).
Because the delimiter of "\" appears multiple times, I don't get what
I'm looking for.
I appreciate your help!
I am looking for help in parsing out a file name from a file path.
I'm using the GetOpenFile api for users to choose the file path, which
is what I'm using for a web form to upload the file to a wiki page;
however, I also want to extract just the file name. So, in the
example below, I want to return a string value of just "History.mdb"
and save that in my table (after the upload, I no longer need the
entire path).
C:\Documents and Settings\me\My Documents\History.mdb
I have tried using the following formula: strfile = Right$
(strFilename, Len(strFilename) - InStr(1, strFilename, "\") - 1).
Because the delimiter of "\" appears multiple times, I don't get what
I'm looking for.
I appreciate your help!