Re: Any way to get file type?

  •  01-07-2012, 11:43 AM

    Re: Any way to get file type?

    for i = 1 to len(mvcfile.filename)-1
     if mid(mvcfile.filename,len(mvcfile.filename)-i,1)="." then
      filetype = Right(mvcfile.filename,i)
      exit for
     end if
    next
     
    This is a simple way, if you run this loop with each uploaded file, it will start with the furthest right character and work backwards until it finds the "." in the name; and then take all characters to the right as the "file type".
View Complete Thread