Archive: RMDir and preserving files?


RMDir and preserving files?
I am using NSIS for some years now and am Very pleased with it! But....

I would like to know if there is a option to preserve files from being deleted with the RMDir command.
For example when a user wants to update software, i would like to delete everything except the configuration file(s)/Directorys.

Is this possible?

With regards,
Rob


you could copy the files you want to keep somewhere with copyfiles, then delete folder, and copy them back

or

use FileFind and friends to delete everything except the config files


Hi,
Maybe it's a solution for me :

I used it before : RMDir /r "$INSTDIR"
But now I do delete the install folder except a file with the extension *.GNT (I dont know the name)

I found this script : _files_in_a_directory_except_one_dir_/_file but it does not work.

@Anders, where can I copy the *.gnt ? have you an example for me ?
Many thanks