我正在尝试从cmd。exe执行命令,但是它输出到很多行...
for %b in ("AB","FG") do (for /D %a in ("C:\FileStore\%~b*") do (echo %~fa))
输出:
C:\Users\admin>(for / %a in ("C:\FileStore\AB*") do (echo %~fa ) )
C:\Users\admin>(echo C:\FileStore\AB Map 1 )
C:\FileStore\AB Map 1
C:\Users\admin>(for / %a in ("C:\FileStore\FG*") do (echo %~fa ) )
C:\Users\admin>(echo C:\FileStore\FG Map 2 )
C:\FileStore\FG Map 2
但是我只想要这个...
C:\FileStore\AB Map 1
C:\FileStore\FG Map 2
我该如何解决?
使用batch-file进行此操作效果很好,但是我需要从cmd运行它。
答案 0 :(得分:2)
要禁用命令的隐式回显,请在命令前加上 Select * from (
SELECT
dbo.FormatAmountforCustomQuery(FORMAT(SUM(pcptlc.Value),'N')) AS [Planned]
,dbo.FormatAmountforCustomQuery(FORMAT((REPLACE(REPLACE([Committed],',',''),'$','') - SUM(pcptlc.Value)),'N')) AS [To Be Planned]
,dbo.FormatAmountforCustomQuery(FORMAT(SUM(pcptla.Value),'N')) AS [Actual]
,dbo.FormatAmountforCustomQuery(FORMAT((REPLACE(REPLACE([Committed],',',''),'$','') - SUM(pcptla.Value)),'N')) AS [Remaining]
from XPV.MyFIlterView d1
) as FilteredView
ORDER BY cast(replace(3,'$','') as float)
:
@
请注意,该行上的每个命令都需要自己的沉默前缀。