NSIS - 如何在排除文件的同时递归复制?

Cug*_*uga 10 installer nsis

我需要递归复制一个目录,但要在其中排除几个目录.

NSIS的文档说File命令采用/r/x参数,但我无法使它们正常工作.

包含我的.nsi脚本的目录结构是:

parent-dir
    dir-to-exclude-1
        setup.nsi
    dir-to-copy-1
    dir-to-copy-2
    dir-to-copy-3
    dir-to-exclude-2
Run Code Online (Sandbox Code Playgroud)

我尝试了以下内容,但它对我不起作用:

SetOutPath $INSTDIR
File /r "..\**" /x "..\dir-to-exclude-1\**" /x "..\dir-to-exclude-2\**"  
Run Code Online (Sandbox Code Playgroud)

在此先感谢您的帮助.

编辑: 我越来越近,所以现在我有:

File /r /x \dir-to-exclude-1\*.* /x \dir-to-exclude-2\*.*  ..\*
Run Code Online (Sandbox Code Playgroud)

现在它将编译并安装所有文件,但不排除我想要的目录.有关如何排除这些内容的任何指导?

Cug*_*uga 5

在同事的帮助下计算出来.只需给出没有任何*的目录名称:

File /r /x dir-to-exclude-1 /x dir-to-exclude-2 /x installer  ..\*
Run Code Online (Sandbox Code Playgroud)