Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
HI,

I am having a strange issue with my code,

I have an asp File Upload Control in my application. and I have a function against it which is taking the file from it and saving it in a temp directory of the project.

Now when user again uploads a file, it replaces the old file with newly uploaded one.
That is fine, and actually what I want,

But I am trying same code on another machine, and there rather replacing the old file, it is creating a separate new file, even with the same name and new content.

For Example, if i uploaded a file "ABC" in temp directory, on 2nd upload, it is placing ABC again in that directory so that 2 ABC files are there,

while it should either save it like ABC(1) etc. as Google Chrome does, with duplicate files,

Any Idea's??
Posted
Comments
Stephen Hewison 8-Oct-13 6:51am    
Are you saying you have two files with exactly the same name and file extension within the same folder? The file system isn't supposed to support that!
VICK 8-Oct-13 6:51am    
I have two different files, BUT with same name and same extension....
Dholakiya Ankit 8-Oct-13 6:52am    
Check extension of tow different files
VICK 8-Oct-13 6:53am    
extensions are same..
Dholakiya Ankit 8-Oct-13 7:02am    
I don't think that is possible!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900