{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "my task",
"type": "shell",
"command": "${workspaceFolder}/abc/mytask.bat",
"options": {
"cwd": "${workspaceFolder}/abc/"
}
}
]
}
这里配置了工作路径cwd,可以确保批处理中使用的路径正确。