How to check if a dir is empty in NSIS
I've just found a rogue directory being left behind by one of my dev tests, so in the next release I'd like to handle it automatically where it already exists on a users PC (plus it is about time I got my head around some NSIS).
The folder in question is %LOCALAPPDATA%\cache\picard
, so I need to delete the picard folder if it exists (this I can do), then delete the cache dir if it is now empty (this I am stuck on).
The code so far:
!macro CustomCodePreInstall
${If} ${FileExists} "$LOCALAPPDATA\cache\picard\*.*"
- Read more about How to check if a dir is empty in NSIS
- 2 comments
- Log in or register to post comments