msdeploy并跳过未命名为x的目录 [英] msdeploy and skip directories not named x

查看:86
本文介绍了msdeploy并跳过未命名为x的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试跳过除目录之外的所有目录-模板目录-但我无法使其正常工作.模板目录包含在跳过的目录中,或者,如果我从正则表达式的开头删除\,则会跳过整个MyTestWebsite目录....

I'm trying to skip all directories apart from one - the Templates directory - but I can't get it to work. Either the Templates directory is included in the skipped directories or, if I remove the \ from the start of the regular expression, I skip the whole MyTestWebsite directory....

"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

很可能是我的正则表达能力让我失望,所以我欢迎任何帮助.

Most likely it is my regular expression skills letting me down so I'd welcome any help.

谢谢 马特

推荐答案

您在正确的路径上,但是您的^$应该位于表达式的远端:

You were on the right path, but your ^ and $ should have been at the far ends of the expression:

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

这篇关于msdeploy并跳过未命名为x的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆