TLama

Untitled

Dec 29th, 2013
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.58 KB | None | 0 0
  1. [Files]
  2. ; this will install (actually backup) the old files into a backup folder and after
  3. ; all of that is done, the CleanupDirectory function is called
  4. Source: "{app}\res_mods\*"; DestDir: "{app}\_res_mods_{#DateTime}"; Flags: external skipifsourcedoesntexist createallsubdirs recursesubdirs; AfterInstall: CleanupDirectory('{app}\res_mods\*')
  5.  
  6. [Code]
  7. procedure CleanupDirectory(const Path: string);
  8. begin
  9.   // note, that I have used no error handling, but you should; for how to DelTree
  10.   // works, please refer to the help file
  11.   DelTree(ExpandConstant(Path), False, True, True);
  12. end;
Advertisement
Add Comment
Please, Sign In to add comment