Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > File IO question with a web application

Reply
Thread Tools

File IO question with a web application

 
 
Paul
Guest
Posts: n/a
 
      07-24-2008
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.
--
Paul G
Software engineer.
 
Reply With Quote
 
 
 
 
Munna
Guest
Posts: n/a
 
      07-24-2008
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
 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      07-24-2008
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.
--
Paul G
Software engineer.


"Munna" wrote:

> 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
>

 
Reply With Quote
 
Jonathan Wood
Guest
Posts: n/a
 
      07-25-2008
I recently dealt with this. I simply deleted the existing file.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Paul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
> --
> Paul G
> Software engineer.


 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      07-28-2008
ok, thanks for the additional information.
--
Paul G
Software engineer.


"Jonathan Wood" wrote:

> I recently dealt with this. I simply deleted the existing file.
>
> --
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>
> "Paul" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.
> > --
> > Paul G
> > Software engineer.

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web application or mvc web application? Andy B ASP .Net 0 08-13-2008 11:32 AM
Converting Web Site to Web Application (AJAX web service goes missing) Lloyd Sheen ASP .Net 1 11-15-2007 05:46 PM
Calling Windows application from Web application ASP .Net 1 11-02-2003 03:30 AM
What issue will HIT me hard when I convert an Access 2002 MDE application to Web Application? Sean ASP .Net 2 08-07-2003 07:13 AM
Newbie question: How do I delete a Web Service or Web Application human ASP .Net 1 07-06-2003 04:39 AM



Advertisments