void deleteFilesInFolder (filePath _inputPath)
{
FilePath folder = "E:\\My uninstaller" ;
FilePath filePath;
Filename attachFilename;
container fileInfo,file;
int fileHandle;
FileName fnameTmp;
;
//Browser
attachFilename = winapi::getOpenFileName(
infolog.hWnd(),
["@SYS26054",'*.*'],
'',
"@SYS26798");
if (! attachFilename)
return;
file = Docu::splitFilename(attachFilename);
//Getting The Folder Path
folder = conpeek(file,3);
fnameTmp = folder;
filePath = fnameTmp;
//...
if (substr(fnameTmp, strlen(fnameTmp) -1,1) == '\\')
{
fnameTmp = fnameTmp + '*.*';
}
else
{
fnameTmp = fnameTmp + '\\*.*';
filePath = filePath + '\\';
}
fileInfo = winAPI::findFirstFile(fnameTmp) ;
fileHandle = conpeek(fileInfo, 1);
fnameTmp = winapi::findNextFile(fileHandle) ;
while (fnametmp)
{
fnameTmp = winapi::findNextFile(fileHandle) ;
if (fnameTmp != "")
winAPI::deleteFile( filePath + fnameTmp);
}
}
No comments:
Post a Comment