Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Files]
- ; this will install (actually backup) the old files into a backup folder and after
- ; all of that is done, the CleanupDirectory function is called
- Source: "{app}\res_mods\*"; DestDir: "{app}\_res_mods_{#DateTime}"; Flags: external skipifsourcedoesntexist createallsubdirs recursesubdirs; AfterInstall: CleanupDirectory('{app}\res_mods\*')
- [Code]
- procedure CleanupDirectory(const Path: string);
- begin
- // note, that I have used no error handling, but you should; for how to DelTree
- // works, please refer to the help file
- DelTree(ExpandConstant(Path), False, True, True);
- end;
Advertisement
Add Comment
Please, Sign In to add comment