我是SCHTASKS的新手,不能让它运行一个简单的命令。我试过的是下面。未创建文件c:\downloads\temp_w.txt。怎么啦?
c:\downloads>ver
Microsoft Windows [Version 10.0.17763.503]
c:\downloads>SCHTASKS /Create /SC MINUTE /MO 1 /TN mydir /TR "dir c:\windows > c:\downloads\temp_w.txt"
WARNING: The task name "mydir" already exists. Do you want to replace it (Y/N)? y
y
SUCCESS: The scheduled task "mydir" has successfully been created.
c:\downloads>schtasks /run /tn mydir
SUCCESS: Attempted to run the scheduled task "mydir".
c:\downloads>dir temp_w.txt
Volume in drive C has no label.
Volume Serial Number is ECC7-1C96
Directory of c:\downloads
File Not Found发布于 2019-05-23 18:18:45
DIR是一个内部命令(请参阅:https://ss64.com/nt/syntax-internal.html)
下列措施应有效(未经测试):
c:\>SCHTASKS /Create /SC MINUTE /MO 1 /TN mydir /TR "cmd /c dir c:\windows > c:\downloads\temp_w.txt"https://stackoverflow.com/questions/56280770
复制相似问题