SHFileOperation bringt immer ne Fehlermeldung...



  • Hallo,
    der folgende Code kopiert zwar mein gewünschtes Verzeichnis, aber bringt danach immer eine Fehlermeldung "yyy kann nicht kopiert werden. Datei kann nicht gefunden werden." Warum? Erkennt der Code nicht wann das Verzeichnisende erreicht ist?

    CString m_strCopyVon = "c:\\hilfe\\win";
    CString m_strCopyNach = "c:\\tmp\\dircopy_files\\";
    
    SHFILEOPSTRUCT lpShFileStruct;
    lpShFileStruct.pFrom = m_strCopyVon;
    lpShFileStruct.pTo = m_strCopyNach;
    lpShFileStruct.wFunc = FO_COPY;
    lpShFileStruct.fFlags = FOF_NOCONFIRMMKDIR | FOF_NOCONFIRMATION;
    lpShFileStruct.fAnyOperationsAborted = FALSE;
    lpShFileStruct.hwnd = NULL;
    SHFileOperation(&lpShFileStruct);
    

    Greets



  • Servus,

    Schuß ins Blaue...

    Hier mal ein Ausschnitt aus der MDSN:

    MSDN schrieb:

    pFrom
    Address of a buffer to specify one or more source file names. These names must be fully qualified paths. Standard Microsoft® MS-DOS® wild cards, such as "*", are permitted in the file-name position. Although this member is declared as a null-terminated string, it is used as a buffer to hold multiple file names. Each file name must be terminated by a single NULL character. An additional NULL character must be appended to the end of the final name to indicate the end of pFrom.

    Ich glaube du musst als "Von" einen oder mehrere Dateien angeben. Als Ziel reicht ein Verzeichnis...

    Weiss es aber nicht ⚠

    *winke*
    Hellsgore


Anmelden zum Antworten