ronn1212
asked on
rename file before uploading usin SAfileUp
I'm using the SAfileUp object in order to allow to upload files to my server.
the method I'm using is SaveAs this way:
fileUp.FORM("file_link").S aveAs upload_path + fileName
everything works fine and the file is saved.
What I want is to check wether a file under that name is already exsits in this folder
if so I want to change the name of the new file and only then save it.
for example if I want to upload "thanks.jpg" and file by this name is already exists in my folder so
the new "thanks.jpg" will be renamed to "thanks1.jpg"
How can I do this? using saFileUp? using fso?
I don't have many points to give but I'll be greatful for any response
the method I'm using is SaveAs this way:
fileUp.FORM("file_link").S
everything works fine and the file is saved.
What I want is to check wether a file under that name is already exsits in this folder
if so I want to change the name of the new file and only then save it.
for example if I want to upload "thanks.jpg" and file by this name is already exists in my folder so
the new "thanks.jpg" will be renamed to "thanks1.jpg"
How can I do this? using saFileUp? using fso?
I don't have many points to give but I'll be greatful for any response
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.