Board index » delphi » How to really delete a file (not to recycle bin) using the windows dialog?

How to really delete a file (not to recycle bin) using the windows dialog?

Hi,

I need to allow my app to copy, move, send to recycle bin and
erase files, using the standard windows dialog. I use the
SHFileoperations to do the first 3, but I can't manage to do it
to erase files. Could u help?

Thanks a lot

Thomas

 

Re:How to really delete a file (not to recycle bin) using the windows dialog?


The message <7i132i$km...@tempo.univ-lyon1.fr>
  from  mdelaga...@cipcinsa.insa-lyon.fr (Marie Delagarde) contains
these words:

Quote
> Hi,
> I need to allow my app to copy, move, send to recycle bin and
> erase files, using the standard windows dialog. I use the
> SHFileoperations to do the first 3, but I can't manage to do it
> to erase files. Could u help?
> Thanks a lot
> Thomas

Try one of these:-

BOOL DeleteFile( LPCTSTR  lpFileName ) //win32

function DeleteFile(const FileName: string): Boolean; //Delphi

--
regards

Andreas

Re:How to really delete a file (not to recycle bin) using the windows dialog?


Quote
Marie Delagarde <mdelaga...@cipcinsa.insa-lyon.fr> wrote in message

news:7i132i$km7$1@tempo.univ-lyon1.fr...

Quote
> I need to allow my app to copy, move, send to recycle bin and
> erase files, using the standard windows dialog. I use the
> SHFileoperations to do the first 3, but I can't manage to do it
> to erase files. Could u help?

Use the same code as you have to send files to the recycle
bin, but omit the FOF_ALLOWUNDO flag.

--
Jeremy Collins
Kansai Business Systems
http://www.kansai.co.uk/

Other Threads