im doing a file upload and creating a random file name. I need to add the random string to the extention of the file uploaded. I currently have it working by grabbing the 4 right charaters, but if they upload a file with more that 3 (.html) it will corrupt the file when saving.
How can i detect the . in the string and grab what evers after it?
Also how can i check that there is on 1 . in the file?
'Generate Random file name
RanFileName = (Int((max-min+1)*Rnd+min))
' Add extension
FileExt = Right(file.FileName, 4)
' Merge Random File Name and extention
FileName = RanFileName & FileExt