Hi José, a couple of questions regarding CopyFolder and CreateFolder from the Help file:
DIM pFileSys AS CFileSys
DIM pFolder AS Afx_Folder PTR ' <-- This line throws compiler error 14 Expected Identifier - Afx_Folder
pFolder = pFileSys.CreateFolder("C:\MyNewFolder")
IF pFolder THEN
' ....
pFolder.Release
END IF
Does CopyFolder require the destination folder to already exist or will CopyFolder create the destination folder?
Looks like a typo. Should be Afx_IFolder
Magic! Thanks, Paul.
> Does CopyFolder require the destination folder to already exist or will CopyFolder create the destination folder?
If the destination folder does not exist, it creates it. If it already exists, it throws an error or overwites it depending if you have passed False or True in the OverWriteFiles parameter.
I have expanded the documentation of CopyFolder:
https://github.com/JoseRoca/WinFBX/blob/master/docs/File%20Management/CFileSys%20Class.md#CopyFolder
I also have corrected the Afx_Folder PTR typo and expanded the documentation for the CopyFile method.
Much appreciated, José, thank you.