Hello,
Would like to delete a folder where hfsql - classic files are stored. I do read those files first then give the user the option to delete the folder altogether. I get the following error.
Unable to delete <D:\New Folder> directory. Check whether you have sufficient rights and whether all the files are closed.
My code to delete
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
WHEN EXCEPTION IN
HClose("*")
HCloseConnection(a360_DataBaseConnection)
DO
Info("HFSQL error while closing connections: " + HError() + HErrorInfo())
a360TransactionCancel(a360_DatabaseConnectionType, a360_ClassicDatabaseTRS, p_sErrorMessage)
RESULT False
END
e_resdelete = fRemoveDir(CompleteDir(a360_classicDir) + p_sCompanyFolder, frRecursive)
IF e_resdelete = False THEN
Info("Directory could not be removed. Check whether you have sufficient rights" + ErrorInfo())
RESULT False
END
// OK Return True
RESULT True
////////////////////////////////////////////////////////////////////////////////////
I get error while executing fRemoveDir command. Seems some files are still open that the folder could not be deleted.
When the folder is deleted from Windows explorer or command prompt, after closing the package, it deletes without any issues.
Would like to know what else I'm missing?
Happiness Always
BKR Sivaprakash
Would like to delete a folder where hfsql - classic files are stored. I do read those files first then give the user the option to delete the folder altogether. I get the following error.
Unable to delete <D:\New Folder> directory. Check whether you have sufficient rights and whether all the files are closed.
My code to delete
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
WHEN EXCEPTION IN
HClose("*")
HCloseConnection(a360_DataBaseConnection)
DO
Info("HFSQL error while closing connections: " + HError() + HErrorInfo())
a360TransactionCancel(a360_DatabaseConnectionType, a360_ClassicDatabaseTRS, p_sErrorMessage)
RESULT False
END
e_resdelete = fRemoveDir(CompleteDir(a360_classicDir) + p_sCompanyFolder, frRecursive)
IF e_resdelete = False THEN
Info("Directory could not be removed. Check whether you have sufficient rights" + ErrorInfo())
RESULT False
END
// OK Return True
RESULT True
////////////////////////////////////////////////////////////////////////////////////
I get error while executing fRemoveDir command. Seems some files are still open that the folder could not be deleted.
When the folder is deleted from Windows explorer or command prompt, after closing the package, it deletes without any issues.
Would like to know what else I'm missing?
Happiness Always
BKR Sivaprakash