Hi,
This code is failing using VFP9sp2+ with error code 0x800A004C | CTL_E_PATHNOTFOUND The path is found by the "FolderExists() function. The error occurs on the DeleteFolder() function. I have tried deleting an empty folder and one with content. I have tried adding and removing ending backslashes to the path. No success... The attached screenshot shows the FolderExists is true. I'm stuck...
Thanks,
Stanley
This screenshot shows everything...
This code is failing using VFP9sp2+ with error code 0x800A004C | CTL_E_PATHNOTFOUND The path is found by the "FolderExists() function. The error occurs on the DeleteFolder() function. I have tried deleting an empty folder and one with content. I have tried adding and removing ending backslashes to the path. No success... The attached screenshot shows the FolderExists is true. I'm stuck...
Code:
lcCompanyPath = Alltrim(company_datapath)
Local lnForm
For lnForm = _Screen.FormCount To 1 Step -1
If ! Alltrim(_Screen.Forms(m.lnForm).Caption) = 'Company Settings'
_Screen.Forms(m.lnForm).Release()
Endif
Endfor
fso = Createobject("Scripting.FileSystemObject")
If fso.FolderExists((lcCompanyPath)) = .T.
fso.DeleteFolder((lcCompanyPath), .T.)
Endif
Thanks,
Stanley
This screenshot shows everything...