recycle bin
recycle bin
Is there a possibility to delete files/directories into the recycle bin in windows?
Re: recycle bin
you can use the RenameFile() if you know the folder of the Recycle Bin with the help of SHGetSpecialFolderLocation_() and #CSIDL_BITBUCKET.
Or maybe this can help:
Or maybe this can help:
Code: Select all
#FOF_NOERRORUI = $400
Procedure RecycleFile(file$)
m=AllocateMemory(Len(file$)+2)
If m
PokeS(m,file$) : SHFileOp.SHFILEOPSTRUCT : SHFileOp\pFrom=m : SHFileOp\wFunc=#FO_DELETE
SHFileOp\fFlags=#FOF_ALLOWUNDO|#FOF_NOERRORUI : ok=SHFileOperation_(SHFileOp) : FreeMemory(m)
If ok=0 : ok=1 : Else : ok=0 : EndIf
EndIf
ProcedureReturn ok
EndProcedure
RecycleFile("YourFile.txt") ; <== change this to your file.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: recycle bin
winapi library
You can do a text search in all files, in this case "recycle" and you will always find the answer.

You can do a text search in all files, in this case "recycle" and you will always find the answer.
