I tried editing both those files with this:
--------------------------------------------------------%>--------------------------------
'See if file exsists
If objFSO.FileExists(Server.MapPath(strUploadFilePath & "\temp\" & saryFileUploads(intLoop))) Then
'Delete file in uploads before moving new one from Temp directory
objFSO.DeleteFile Server.MapPath(strUploadFilePath & "\" & saryFileUploads(intLoop))
'Move file
objFSO.MoveFile Server.MapPath(strUploadFilePath & "\temp\" & saryFileUploads(intLoop)), Server.MapPath(strUploadFilePath & "\" & saryFileUploads(intLoop))
--------------------------------------------------------%>--------------------------------
I also edited functions_upload.asp with this:
--------------------------------------------------------%>--------------------------------
'If the file is OK save it to disk
If lngErrorFileSize = 0 AND blnExtensionOK Then
'### DISABLED TO KEEP FILENAME THE SAME ###
'Create a new file name for the file with the date a time included
'strNewFileName = newFileName(strNewFileName) ' commented out
'Save the file to disk
.Files(1).SaveAs strFileUploadPath & "/" & strNewFileName
--------------------------------------------------------%>--------------------------------
and it seems to work OK in my lab. The original file is deleted just befote the file is moved from the temp directory.
What I was having trouble with was that the objFSO.MoveFile was not moving the file if the same name file existed so I delete the file with objFSO.DeleteFile function in the uploads folder (not the "temp" folder) just before the file move function.
Feedback welcome.
Cheers Justin