Quantcast
Channel: Flexera Community Forums
Viewing all articles
Browse latest Browse all 4553

DeleteDir doesn't work.

$
0
0
I've tried these options:

Option1:
szDelPath = CommonAppDataFolder ^ "JetAdvice";
DeleteDir(szDelPath, ALLCONTENTS);

Option2:
szDelPath = CommonAppDataFolder ^ "JetAdvice";
ChangeDirectory("C:");
LongPathToShortPath(szDelPath);
DeleteDir(szDelPath, ALLCONTENTS);

Option3:
szDelPath = CommonAppDataFolder ^ "JetAdvice";
nResult = FindAllFiles( szDelPath, "*.*", szFilePath, RESET );
while ( 0 = nResult )
SetFileInfo( szFilePath, FILE_ATTRIBUTE, FILE_ATTR_NORMAL, "" );
nResult = FindAllFiles( szDelPath, "*.*", szFilePath, CONTINUE );
endwhile;

ChangeDirectory("C:");
LongPathToShortPath(szDelPath);
DeleteDir(szDelPath, ALLCONTENTS);

But none of them works. Kindly help me to get through this.

Thanks in advance

Viewing all articles
Browse latest Browse all 4553

Trending Articles