Skip to main content

[archive] How to Send Deleted files to Recycle Bin.

  • January 25, 2007
  • 4 replies
  • 0 views

[Migrated content. Thread originally posted on 24 January 2007]

Does anybody know a way to do this. I would like to be able to delete a processed file and have it go to the Recycle bin. This way if the customer wants to re-process the file, they can restore it.

Thanks,

4 replies

[Migrated content. Thread originally posted on 24 January 2007]

Does anybody know a way to do this. I would like to be able to delete a processed file and have it go to the Recycle bin. This way if the customer wants to re-process the file, they can restore it.

Thanks,
Please to meet you STHOGE:

I hope the Zip File Attached may help you to resolve your needs.

Cb52 (A Gaucho from the Pampas)

[Migrated content. Thread originally posted on 24 January 2007]

Does anybody know a way to do this. I would like to be able to delete a processed file and have it go to the Recycle bin. This way if the customer wants to re-process the file, they can restore it.

Thanks,
Thanks, that definitely pointed me in the right direction. Sometimes half the battle is being able to find what you are looking for. I'm thinking of expanding on this API call (SHFileOperation) to include copying files. This is a nice tool as when copying files you can have it automatically bring up the progress bar. There are a lot of places in our software where we are copying large files and all the user sees is a "Please Wait" type message.

Thanks again,

[Migrated content. Thread originally posted on 24 January 2007]

Does anybody know a way to do this. I would like to be able to delete a processed file and have it go to the Recycle bin. This way if the customer wants to re-process the file, they can restore it.

Thanks,
CB52,

I looked at your readme.txt file and you stated that you could not get the prompt to go away for sending files to the recycle bin. If you set the del2-flag-struct in your example code to a value of 80, it will work.

Looking at the shellapi.h file, it shows hex values for each of the flags and looking at your del2rbin.cbl file, it appears that you used decimal values instead. If you set the NoConfirmation flag (Hex "0010", Decimal value 16) and the AllowUndo (Hex "0040", Decimal value 64), it comes to a Decimal value of 80 (Hex "0050"). I have tested this and it sends the file directly to the recycle bin without prompting the user, which in my case is what I want it to do.

If you look at the attached copy file, you will see how I set up the variables.

Again, I want to thank you for pointing me in the right direction on this one.

[Migrated content. Thread originally posted on 24 January 2007]

Does anybody know a way to do this. I would like to be able to delete a processed file and have it go to the Recycle bin. This way if the customer wants to re-process the file, they can restore it.

Thanks,
Steven:

Thanks for your information about confirmation message.
I think now we're even.

CB52 (over and out).