Hello
I am tring to create a page that will allow the user to upload a file from their harddrive, have the file name (without the directory) appear in a textbox.
I have the directory and the file name - how can I get just the file name?
Example: C:\Program Files\March\Status\WeeklyRpt.doc
How can I get just "WeeklyRpt.doc"?
I'm using...
Is there something like "FileName" that will not show the directory?
If I have to parse the string, how can I get the position of the last back slash in the directory plus file name?
Thanks in advance
Dave
I am tring to create a page that will allow the user to upload a file from their harddrive, have the file name (without the directory) appear in a textbox.
I have the directory and the file name - how can I get just the file name?
Example: C:\Program Files\March\Status\WeeklyRpt.doc
How can I get just "WeeklyRpt.doc"?
I'm using...
Code:
<INPUT id="myFile" type="file" name="myFile" runat="server">
Code:
Dim sFile As String = myFile.PostedFile.FileName
Is there something like "FileName" that will not show the directory?
If I have to parse the string, how can I get the position of the last back slash in the directory plus file name?
Thanks in advance
Dave