Search code examples
delphidelphi-2010

How do I bypass Window's 'Copying'/file transfer window


I am coding a (specific) backup program (for Minecraft) and I would like to know a way I can bypass this window:

enter image description here

I am still a beginner at Delphi, but I would like to see the different methods I could use to do so.

Thank you in advance :)


Solution

  • You are using SHFileOperation to do the file copy. If you want it to be silent then include

    FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR
    

    in SHFILEOPSTRUCT.fFlags.