批量手工而不是运行在计划任务 [英] Batch runs manually but not in scheduled task
本文介绍了批量手工而不是运行在计划任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不写一般批
,但我现在有一个批量
使用 FORFILES
来从一个文件夹复制我的FLV文件到另一个。当我手动运行该批处理它屡试不爽,但是从计划任务,它抛出一个(为0x1)
错误。
FORFILES -pC:\\ Program Files文件\\的Adobe \\ Flash Media Server的4.5 \\程序\\用户名\\流-m *。FLV的-s -d -1 -cCMD / C复制@file ^ 0x22C:\\程序文件^ \\的Adobe \\ ^的Flash媒体服务器^ ^ 4.5 \\程序\\用户名\\输出\\
不知道是什么语法预定任务不喜欢。
更新
在我的计划任务,操作我有以下几点:
程序/脚本:name.bat
出发点(可选):\\\\服务器\\文件\\到\\批
解决方案
在我的出发点(可选):
路径是一个UNC路径,这是行不通的。让我感动的服务器上我的批处理和一切工作正常。
I don't generally write batches
, but I currently have a batch
that uses forfiles
to copy my FLVs from one folder to another. When I run the batch manually it works every time, but from a scheduled task, it throws a (0x1)
error.
forfiles -p "C:\Program Files\Adobe\Flash Media Server 4.5\applications\name\streams" -m *.flv -s -d -1 -c "cmd /c copy @file ^0x22C:\Program^ Files\Adobe\Flash^ Media^ Server^ 4.5\applications\name\output\"
Not sure what syntax the scheduled task doesn't like.
Update
Under my scheduled task, Actions I have the following:
Program/script: name.bat
Start in (optional): \\servername\file\to\batch
解决方案
When my Start in (optional):
path was a UNC path, it wouldn't work. So I moved my batch on the server and everything worked correctly.
这篇关于批量手工而不是运行在计划任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文