我正在尝试通过执行如下所示的操作来为构建目录中的每个文件执行命令:
- task: CmdLine@2
displayName: 'List files'
inputs:
script: |
for %f in ( "$(Build.ArtifactStagingDirectory)\*" ) do @echo %f
我收到以下错误,
==============================================================================
Generating script.
Script contents:
for %f in ( "C:\Users\tester\my_agent\_work\1\a\*" ) do @echo %f
========================== Starting Command Output ===========================
"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\Users\tester\my_agent\_work\_temp\7a83c3a7-8a9e-4edf-aa36-e4e14d1ee5c7.cmd""
\Users\tester\my_agent\_work\1\a\*" ) do @echo f was unexpected at this time.
##[error]Cmd.exe exited with code '255'.
Finishing: List files
如何更正上面的任务以使其按预期工作?