Delete a file on the server within a web application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGF1bA==?=

    Delete a file on the server within a web application

    Hi just wondering if anyone knows how to delete a file on the server from a
    web app, using c# vs2005, thanks.
    --
    Paul G
    Software engineer.
  • Juan T. Llibre

    #2
    Re: Delete a file on the server within a web application

    That question is asked at least 4 times a month here.

    Please do, at least, a minimal Google search before you post any question :

    Here's the Google search. The first link returns the answer to your question.





    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    =============== =============== ========
    "Paul" <Paul@discussio ns.microsoft.co mwrote in message news:AB9371D3-C6E4-484E-BAF1-861476797FE8@mi crosoft.com...
    Hi just wondering if anyone knows how to delete a file on the server from a
    web app, using c# vs2005, thanks.
    --
    Paul G
    Software engineer.

    Comment

    • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

      #3
      RE: Delete a file on the server within a web application


      System.IO.File. Delete("filenam e");

      -- bruce (sqlwork.com)


      "Paul" wrote:
      Hi just wondering if anyone knows how to delete a file on the server from a
      web app, using c# vs2005, thanks.
      --
      Paul G
      Software engineer.

      Comment

      • =?Utf-8?B?UGF1bA==?=

        #4
        Re: Delete a file on the server within a web application

        ok thanks, will use a google search first for simple questions like this one.
        I ended up using
        FileInfo filename = new FileInfo(direct path);
        filename.Delete ();
        Paul G
        Software engineer.


        "Juan T. Llibre" wrote:
        That question is asked at least 4 times a month here.
        >
        Please do, at least, a minimal Google search before you post any question :
        >
        Here's the Google search. The first link returns the answer to your question.

        >
        >
        >
        >
        Juan T. Llibre, asp.net MVP
        asp.net faq : http://asp.net.do/faq/
        foros de asp.net, en español : http://asp.net.do/foros/
        =============== =============== ========
        "Paul" <Paul@discussio ns.microsoft.co mwrote in message news:AB9371D3-C6E4-484E-BAF1-861476797FE8@mi crosoft.com...
        Hi just wondering if anyone knows how to delete a file on the server from a
        web app, using c# vs2005, thanks.
        --
        Paul G
        Software engineer.
        >
        >
        >

        Comment

        Working...