Hello,
I create a directory and after install I want to delete it. It has more than 1 file - all have the *.exe extension. I make sure the files are not read only and then try to delete them - but it does not work.
If I name the files individually then it does work - but this is
unacceptable. The number of files be will getting bigger (and there are 8 localized versions for EACH file!)
Is there a simple way to do this?
Currently, this does not work:
SetFileInfo ( strDirecory ^ "*.*" , FILE_ATTRIBUTE , !FILE_ATTR_READONLY , szResult);
DeleteFile (strDirectory ^ "*.*"):
DeleteDir ( strDirectory, ALLCONTENTS);
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
DeleteDir not working properly.
Started by
chris tyghe
, Mar 12 2002 20:55
2 replies to this topic
Posted 13 March 2002 - 01:58
I've never needed to use DeleteDir, but I've successfully used DeleteFile several times using ISP 6.31.
I'd suggest checking the result of each of these calls and double check the content of your string.
I'd suggest checking the result of each of these calls and double check the content of your string.
Posted 13 March 2002 - 13:52
Hi Chris,
1- Have you examined the returncode of DeleteFile and DeleteDir for more information ?
2- Have you checked manually if the files are not read-only?
3- have these files been previously accessed with FindAllFiles, and if, so have been released with FindAllFiles(...,CANCEL) ?
1- Have you examined the returncode of DeleteFile and DeleteDir for more information ?
2- Have you checked manually if the files are not read-only?
3- have these files been previously accessed with FindAllFiles, and if, so have been released with FindAllFiles(...,CANCEL) ?