可符合LZ所需
Dim ExtendFileName,TempNum,Temp,PhotoDirectory '定义变量
PhotoDirectory=File_Path '获取上传目录
name = Lcase(name) '文件名转为小写
name = "1" & Mid(name,inStrRev(name,".")) '找出文件后缀名
ExtendFileName = Mid(name,inStrRev(name,".")) '后缀名
TempNum = Right(GetTimeValue(DEF_Now),6) '时间串的右边6位
GetSaveFileName = TempNum & ExtendFileName '拼上后缀名
On Error Resume Next
Set FS = CreateObject(File_FSO) 'FSO对象
If File_FSO = "" or err <> 0 Then
Err.Clear
GetSaveFileName = Left(GetTimeValue(DEF_Now),8) & GetSaveFileName '时间串左8位 + GetSaveFileName 变量
PhotoDir = Server.MapPath(PhotoDirectory) & "\"
Set Fs = Nothing
Exit Function
---------------------------
想用原名的话,最后GetSaveFileName=name就行了。