0

In [Files] I added

  Source: "files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs;

now in [Code] I would like retrieve all folders with depth = 1. For example:

files\some    
files\some2   

Is it possible?

edit: I found a solution using the preposessing:

#define FindHandle
#define FindResult
#define Mask ".\files\*.*"

#sub ProcessFoundFile
  #define FileName FindGetFileName(FindHandle)
  #if FileName == ".." || FileName == "."

  #else
  Log(' {#FileName}');
  #endif
#endsub

#for {FindHandle = FindResult = FindFirst(Mask, faDirectory); FindResult; FindResult = FindNext(FindHandle)} ProcessFoundFile
#if FindHandle
#expr FindClose(FindHandle)
#endif
user2054758
  • 321
  • 3
  • 18
  • Where do you want to *retrieve* them ? Note that these are source folders (known just at the compilation time) and you are asking how to get them in `[Code]` section which is a runtime section. – TLama Sep 28 '14 at 23:59
  • in an array,so since this i could know what files are included in the installer right? – user2054758 Sep 29 '14 at 00:04
  • You cannot [`access file list`](http://stackoverflow.com/q/8924137/960757) from the `[Code]` section (if that is your aim). But in your case it would be e.g. possible to let the preprocessor generate a text file with the file (and/or directory) list. Such text file you could then include in the setup and read it at runtime. – TLama Sep 29 '14 at 00:11
  • and i must manually write paths to that files? or exist a way to do it parsing the directory? – user2054758 Sep 29 '14 at 00:14
  • Preprocessor can list them for you. But it can either inline them in the script, or make a file with their list. – TLama Sep 29 '14 at 00:19

0 Answers0