Shell Namespace

Hi, Good day!

When I try to copy / rename one folder and its subfolder with
SHFileOperation, I got intermittent problem. Sometimes it works. The other
time got error message, yet it still copy all the stuff to the new folder.

    shFileOpStruct: TSHFileOpStruct;
    strForm, strTo: String;

    with shFileOpStruct do
     begin
         Wnd := Application.Handle;
         wFunc := FO_COPY;
         pFrom := PChar (strFrom);
         pTo := PChar (strTo);
         fFlags := FOF_RENAMEONCOLLISION or FOF_NOCONFIRMATION or
FOF_NOCONFIRMMKDIR;
         lpszProgressTitle := nil;
         hNameMappings := nil;
         fAnyOperationsAborted := False;
     end;
        SHFileOperation (shFileOpStruct);
        SHChangeNotify (SHCNE_UPDATEDIR, SHCNF_PATH, PChar (strTo), nil);

Thanks in advance.

Xingyi

maxin...@ebooksys.com
http://www.ebooksys.com