开发者

Filename not displaying in cmd

开发者 https://www.devze.com 2023-02-14 10:31 出处:网络
I开发者_运维技巧 have the following snippet $svc_Files = gci | Where {$_.extension -eq \".svc\"}

I开发者_运维技巧 have the following snippet

$svc_Files = gci | Where {$_.extension -eq ".svc"}
write-host "Building WSDL ..."
$cmd_svc = "`"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\SvcUtil.exe`"" 
Foreach ($svc_File in $svc_Files) 
{
    write-host "& $cmd_svc http://id.web/Services/$svc_File?wsdl"
}

The problem is that the file name is not displaying. However, once i remove "?wsdl", the filename displays.

How can I get the file name to display with "?wsdl" on the end?


  write-host "& $cmd_svc http://id.web/Services/${svc_File}?wsdl"


Try this:

write-host "& $cmd_svc http://id.web/Services/$svc_File`?wsdl"

You could also do this:

write-host "& $cmd_svc http://id.web/Services/$($svc_File)?wsdl"

0

精彩评论

暂无评论...
验证码 换一张
取 消