Using the CreateNewFile Property of SoftArtisans FileUp Versions 3.2.4 and Above
If you have the CreateNewFile property set to true, FileUp checks in the upload directory to see if a file of the same name has already been uploaded. If it has, FileUp takes the filename and concatenates a number - starting at _0 and going up to _999. So if your original filename is filename.ext and FileUp finds a file called filename.ext in the upload directory, it will rename the currently uploading file to filename_0.ext. Later, you upload another file by the same name and it is renamed to filename_1.ext, etc... Important: Set CreateNewFile directly after setting FileUp's Path property. Here is a sample of using the CreateNewFile property:
<%
'--- Instantiate SoftArtisans FileUp
Set upl = Server.CreateObject("SoftArtisans.FileUp")
'---
'--- Set the default path to store uploaded files.
upl.Path = "c:\temp"
'---
'--- Use CreateNewFile method
upl.CreateNewFile = true
'---
'--- Save file
upl.Save
%>
|