hi, i try to upload a multiple image files. after that i will rename the files name.
the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok this is my codes,
and then i try to delete the data using this
but it return error, file no found.
it work perfectly if i insert the diffrent files name but something i dont really understood in here isn't the upload.Files will functioning like an array? array(0) then if next, array(1) and continue...
the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok this is my codes,
Code:
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.Save("d:\cmsupload\cimg\")
for each File in upload.Files
'
'...sme operation here..
set rename = CreateObject("scripting.FileSystemObject")
set f = rename.GetFile(filepath1)
f.Copy "d:\www\cmsupload\cimg\" newname & "." & Ext, false
next
Code:
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.Save("d:\cmsupload\cimg\")
for each File in upload.Files
'
'...sme operation here..
set rename = CreateObject("scripting.FileSystemObject")
set f = rename.GetFile(filepath1)
f.Copy "d:\www\cmsupload\cimg\" newname & "." & Ext, false
Set fso = CreateObject("Scripting.FileSystemObject")
fso.Deletefile ("c:\windows\desktop\" & oldname)
next
it work perfectly if i insert the diffrent files name but something i dont really understood in here isn't the upload.Files will functioning like an array? array(0) then if next, array(1) and continue...
Comment