File IO question with a web application

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi I have a web application that uploads files to the server which is
working. A minor issue is that if the file already exists I get the error
file.doc already exists.
Just wondering if there is a way to have it automatically replace the file
and not produce the error?
thanks.
 
hi,

first check if the file already exists or not...
if exists give the user option to choose between replace or not...
if user chooses replace delete the previous file and then upload the
file...

best of luck


Munna
 
Hi, thanks for the response. I will give it a try. I think the method you
have described will work well for my application as in some cases the file
path is just a path to a directory or a URL, so in those cases there are no
files to delete.
 
Back
Top