C# - Recycle Bin

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gene Vital

    #1

    C# - Recycle Bin

    Can someone point me in the right direction on how to send files to the
    Recyle Bin using C#.
  • Tim Wilson

    #2
    Re: C# - Recycle Bin

    The way I've done this in the past is to p/invoke SHFileOperation .

    http://msdn.microsoft.com/library/de...eoperation.asp

    --
    Tim Wilson
    ..Net Compact Framework MVP

    "Gene Vital" <nothankyou@msn ew.com> wrote in message
    news:e5oTwN7WFH A.3760@TK2MSFTN GP15.phx.gbl...[color=blue]
    > Can someone point me in the right direction on how to send files to the
    > Recyle Bin using C#.[/color]


    Comment

    • Gene Vital

      #3
      Re: C# - Recycle Bin

      Tim Wilson wrote:[color=blue]
      > The way I've done this in the past is to p/invoke SHFileOperation .
      > http://www.pinvoke.net/default.aspx/...HFileOperation
      > http://msdn.microsoft.com/library/de...eoperation.asp
      >[/color]


      Thanks for the links, that is the direction I was going.


      I thought it would be built into the frameworks and just wanted to check
      and makes sure I didn't miss something.

      Comment

      • Tim Wilson

        #4
        Re: C# - Recycle Bin

        AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
        something that has been included in 2.0 (currently beta) or not.

        --
        Tim Wilson
        ..Net Compact Framework MVP

        "Gene Vital" <nothankyou@msn ew.com> wrote in message
        news:ukuMpb8WFH A.712@TK2MSFTNG P14.phx.gbl...[color=blue]
        > Tim Wilson wrote:[color=green]
        > > The way I've done this in the past is to p/invoke SHFileOperation .
        > > http://www.pinvoke.net/default.aspx/...HFileOperation
        > >[/color][/color]
        http://msdn.microsoft.com/library/de...eoperation.asp[color=blue][color=green]
        > >[/color]
        >
        >
        > Thanks for the links, that is the direction I was going.
        >
        >
        > I thought it would be built into the frameworks and just wanted to check
        > and makes sure I didn't miss something.[/color]


        Comment

        • Gene Vital

          #5
          Re: C# - Recycle Bin

          Tim Wilson wrote:[color=blue]
          > AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
          > something that has been included in 2.0 (currently beta) or not.
          >[/color]
          ok, that works nicely. pointer to how to undelete from the recycle bin ?

          Comment

          • Tim Wilson

            #6
            Re: C# - Recycle Bin

            I haven't had a need to go "the other way" and restore a file from the
            recycle bin. So I can't give you a direct pointer but, after doing some
            poking around, it seems that a few people recommend reading the article
            linked below for information on dealing with the recycle bin. I'm not sure
            if it will give you all the information you need but it should give you a
            start.


            If that turns out to be a bust, then try looking through some other posts on
            the subject to see if any have some more insight.


            --
            Tim Wilson
            ..Net Compact Framework MVP

            "Gene Vital" <nothankyou@msn ew.com> wrote in message
            news:OdrsSx8WFH A.1148@tk2msftn gp13.phx.gbl...[color=blue]
            > Tim Wilson wrote:[color=green]
            > > AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
            > > something that has been included in 2.0 (currently beta) or not.
            > >[/color]
            > ok, that works nicely. pointer to how to undelete from the recycle bin ?[/color]


            Comment

            Working...