WinApi::deleteFile
Создан класс RunBaseBatch, который удаляет файлы из папки
if (WinAPI::folderExists(#ExportPath))
{
[handle, fileNameOpen] = WinAPI::findFirstFile(#ExportPath + "\\*.xlsx");
while (fileNameOpen)
{
createdDate = WinAPI::getFileCreatedDate(#ExportPath + "\\"+fileNameOpen);
delta = systemDateGet() - createdDate;
if(invoiceStorePeriod && delta >= invoiceStorePeriod)
{
if (WinApi::fileExists(#ExportPath + "\\"+fileNameOpen))
{
WinApi::deleteFile(#ExportPath + "\\"+fileNameOpen);
}
}
fileNameOpen = WinAPI::findNextFile(handle);
}
}
Из job это все отлично работает и удаляет файлы из папки, а вот из класса не удаляет, в чем может быть проблема, подскажите пожалуйста.
|