Help trimming off filename from path



I've got a form where i need to pull both the directory of a filename
and the directory with the filename of an .inf file... I figured the
easiest way to do this was to have an <input id=test type=file
runat=server> control for the user to find the .inf file, and then make
vb cut off the filename upon submission of the form. I just can't
figure out how to trim off the filename leaving just the directory it's
located in.


just as a test i'm trying to display the content as follows

Label1.Text = formINFLocation.Value.Trim(formDriverINF.FileName)

I did this hoping to dynamically trim off any inf filename that is
chosen... though it seems that the Trim function does not work the way
i was assuming it did. Is there another way to remove the filename from
this location? I have a hunch it's far more complicated than my simple
idea here. :D

.



Relevant Pages

  • Re: Help trimming off filename from path
    ... and the directory with the filename of an .inf file... ... runat=server> control for the user to find the .inf file, ... Dim dirName As String = System.IO.Path.GetDirectoryName ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Help trimming off filename from path
    ... "PvtPile" schrieb: ... and the directory with the filename of an .inf file... ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Using INCLUDETEXT with a file thats not there.
    ... As far as I know the best you can doing using fields alone is to use ... out the filename and check its existence, then either insert an INCLUDETEXT, ... I'm trying to perform a merge in Word and pull in another document if the ... document with the INCLUDETEXT field? ...
    (microsoft.public.word.mailmerge.fields)
  • Re: how to trim file path from filename
    ... But for the the file to be effective I need to trim the path from the ... filename and leave just the filename. ... The traditional directory separator is regular slash, ... UNIX may contain backslash as well. ...
    (comp.lang.javascript)
  • Re: Pulling just the filename
    ... Is there a way that I can pull out just the filename? ... Download and install Longre's free morefunc.xll add-in from ... to return the last string that follows a "/" ...
    (microsoft.public.excel)