Cmd 在路径名或参数中使用单引号安排任务

Cmd 在路径名或参数中使用单引号安排任务,cmd,scheduled-tasks,windows-task-scheduler,Cmd,Scheduled Tasks,Windows Task Scheduler,要安排的任务类似于: notepad.exe "D:\ben's notes\foo.txt" 经过一些挖掘后,我设法获得/TR参数以接受空格: "notepad.exe \"D:\ben's notes\foo.txt\"" 但是,schtasks.exe也将每个单引号替换为双引号: notepad.exe "D:\ben"s notes\foo.txt" 有没有什么方法可以让我摆脱内心的单引号之类的东西?我最后用了这个:我最后用了这个:

要安排的任务类似于:

notepad.exe "D:\ben's notes\foo.txt"
经过一些挖掘后,我设法获得/TR参数以接受空格:

"notepad.exe \"D:\ben's notes\foo.txt\""
但是,schtasks.exe也将每个单引号替换为双引号:

notepad.exe "D:\ben"s notes\foo.txt"
有没有什么方法可以让我摆脱内心的单引号之类的东西?

我最后用了这个:

我最后用了这个: