Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 批处理的计划运行未将输出记录到文件_Windows_Batch File_Cmd_Scheduled Tasks - Fatal编程技术网

Windows 批处理的计划运行未将输出记录到文件

Windows 批处理的计划运行未将输出记录到文件,windows,batch-file,cmd,scheduled-tasks,Windows,Batch File,Cmd,Scheduled Tasks,我有两个批处理文件,一个调用另一个 1) test1.bat具有内容ping 127.0.0.1 2) test.bat具有内容调用“D:\test1.bat”>>output1.txt 2>&1 当我双击test.bat时,正如预期的那样,输出被记录到output1.txt。但是,当我计划相同的test.bat文件时,不会记录任何内容 我正在使用普通的Windows任务调度程序安排此任务。这里缺少什么?windows任务计划程序的工作目录在哪里?我想你会在那里找到output1.txt;或者尝

我有两个批处理文件,一个调用另一个

1)
test1.bat
具有内容
ping 127.0.0.1

2)
test.bat
具有内容
调用“D:\test1.bat”>>output1.txt 2>&1

当我双击
test.bat
时,正如预期的那样,输出被记录到
output1.txt
。但是,当我计划相同的
test.bat
文件时,不会记录任何内容


我正在使用普通的Windows任务调度程序安排此任务。这里缺少什么?

windows任务计划程序的工作目录在哪里?我想你会在那里找到output1.txt;或者尝试
调用“D:\test1.bat”>>D:\output1.txt 2>>&1

windows任务计划程序的工作目录在哪里?我想你会在那里找到output1.txt;或者尝试调用“D:\test1.bat”>>D:\output1.txt 2>>&1oops yes!这就是问题所在。请把它作为答案提出来,我会记下来的