delete file from drive
-
Hi, I know with the "file upload" control you can upload files, but my question is, how can I delete those files, or delete a specific file from my hdd if I know the path, using asp.net?
System.IO.File.Delete("FilePath");
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
-
System.IO.File.Delete("FilePath");
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
Thanks Just one question. Will "FilePath" be the complete path from "C:\" or from within the application path on IIS or server? EG http://localhost/invoices/mysheet.doc
-
Thanks Just one question. Will "FilePath" be the complete path from "C:\" or from within the application path on IIS or server? EG http://localhost/invoices/mysheet.doc
Use the actually file path "C:\"
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
-
Use the actually file path "C:\"
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
-
You can use Server.MapPath to translate from the relative path to the absolute. You may run into permissions exceptions, just a heads up. ~A
It is true, we have a have web farm so we have two IIS servers running the same site. We can't even write files because the account running aspnet doesn't have access to the network drives. Users can't save files to local drives because it is two machines. After 2 years, I finally came up with a work around. I created a web service that impersonates a windows account and accepts a byte array as a parameter. I call the web service to write files to a networked directory that the impersonated account has access to. I should write an article about it.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06