Click here to Skip to main content
15,888,233 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more: , +
I am trying to delete a file from project directory and sql server. IT is deleting record from sql server but unfortunately my code is not working on the file which exist in project directory ? any one have a idea how to delete that file ????

regards.......

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 14-Oct-12 3:33am
v2
Comments
[no name] 14-Oct-12 9:03am    
Sure delete the file. There is nothing in your posting that indicates any errors that you are getting, what you have done or what is happening within your code.
Ed Nutting 14-Oct-12 9:07am    
He will follow with a question titled "How to turn off Caps-Lock?" :P
[no name] 14-Oct-12 9:09am    
And then a question about why spamming forums is bad.
OriginalGriff 14-Oct-12 9:33am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

1 solution

This whole request makes no sense because, from the standpoint of the run time of the application you develop, there is no such thing as "project folder". This folder is for source code only. Adding, deleting file, etc., could be a matter of software development, but never a matter of the behavior of your program. If, by some weird reason, the question was not about your code, it would simply be off-topic.

—SA
 
Share this answer
 
Comments
AnkitGoel.com 15-Oct-12 2:44am    
Please explain more. Also provide code you are using to delete the file.
Sergey Alexandrovich Kryukov 15-Oct-12 2:48am    
Just read it again. The code? System.IO.File.Delete. But it makes no sense, as I explained. Did not get it and need more? Explain what you did not get more.
--SA
AnkitGoel.com 15-Oct-12 2:53am    
Please share the path of the file you are deleting.
Sergey Alexandrovich Kryukov 15-Oct-12 11:13am    
Who are you talking to? To OP? What this path can tell you? The whole idea is wrong; or there is something else, not explained by OP.
--SA

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