gpt4 book ai didi

msdeploy 并跳过未命名为 x 的目录

转载 作者:行者123 更新时间:2023-12-04 05:32:43 26 4
gpt4 key购买 nike

我试图跳过除一个目录之外的所有目录 - Templates 目录 - 但我无法让它工作。 Templates 目录包含在跳过的目录中,或者,如果我从正则表达式的开头删除了\,我将跳过整个 MyTestWebsite 目录....

"C:\Program Files\IIS\Microsoft Web Deploy V2\msdeploy.exe" 
-verb:sync -source:contentPath="MyTestWebsite"
-dest:contentPath="MyTestWebsite",computerName=Server2
-skip:objectName=dirPath,absolutePath=\\(?!^Templates\\$).*
-skip:objectName=filePath,absolutePath=keepalive\.htm -whatif

很可能是我的正则表达式技巧让我失望,所以我欢迎任何帮助。

谢谢
马特

最佳答案

您走在正确的道路上,但您的 ^$应该在表达式的远端:

-skip:objectName=dirPath,absolutePath=^(?!\\Templates\\).*$

关于msdeploy 并跳过未命名为 x 的目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12368655/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com