Thread: File upload
View Single Post
  #5 (permalink)  
Old January 8th, 2009, 08:28 PM
alliancejhall alliancejhall is offline
Friend of Wrox
Points: 788, Level: 10
Points: 788, Level: 10 Points: 788, Level: 10 Points: 788, Level: 10
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 199
Thanks: 2
Thanked 15 Times in 15 Posts
Default Didn't see this before....

Are you adding test to the beginning of the file name when saving it or are you trying to add the file to the test directory under c:\ ?

if you are adding test to the file name then change my code to be this...

If System.IO.File.Exists("C:\test" & FileUpload1.PostedFile.FileName) Then

otherwise

If System.IO.File.Exists("C:\test\" & FileUpload1.PostedFile.FileName) Then

should work?
__________________
Jason Hall
Reply With Quote
The Following User Says Thank You to alliancejhall For This Useful Post:
jminatel (January 9th, 2009)