Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · ASP.NET Newsletter Application · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : .NET : ASP.NET : Checking if file already exists ? Signup · Login
Author Thread
Checking if file already exists ?
Posted in tutorial: Uploading, Determining Size, Width and Height and Resizing Image Files with ASP.NET
·  Rustan
User
Joined: 10 Jun 2005
Total Posts: 3

Checking if file already exists ?

Posted: 10 Jun 2005
Great tutorial! thanks a lot

I would however like to check if the file being uploaded already exists in the directory, and if so cancel the upload or rename the new file to something else.

How would i go about doing that?
·  Rustan
User
Joined: 10 Jun 2005
Total Posts: 3
solved
Posted: 10 Jun 2005
I solved it simply by doing the following, so forget my question :)

if(!System.IO.File.Exists(filePath))
Want to leave a comment? Login or Register for free!

Users Who Have Visited This Thread In Last 24 Hours
3 Visitors

Login to post a comment or start a new thread
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2010 Stardeveloper.com, All Rights Reserved.