Windows批处理文件和可执行文件 [英] Windows Batch Files and Executables

查看:72
本文介绍了Windows批处理文件和可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!



我一直在尝试创建一个将文本传递给控制台应用程序的批处理文件。在这种情况下,它是一个exe文件,它将一个大的.dat文件修剪为指定的开始/停止时间和日期。它期望文件名,开始,停止和y(es)响应开始削减。下面的脚本有效,但在提交最终的y响应后,.exe终止,甚至没有尝试开始剪切。



任何人都可以看到可能出错的地方?尝试ping延迟,暂停,/等待 - 所有效果都相同。



@echo关闭



设置program = c:\rtdm_cutter.exe





echo 20121126_191613_09224_RTDM.BIN

echo 2012 / 11/25 15:00:00

echo 2012/11/25 15:15:00

echo y

)| start / realtime / B / wait%program%

解决方案

试试这个:



CALL" c:\ rtdm_cutter.exe" 20121126_191613_09224_RTDM.BIN" 2012/11/25 15:00:00" 2012/11/25 15:15:00 ÿ

Hi!

I''ve been trying to create a batch file that passes text to a console application. In this case its an exe that trims a large .dat file to the start/stop time and date specified. It expects the file name, start, stop, and a y(es) response to start the cut. The script below works, but after submitting the final "y" response, the .exe terminates without even attempting to start the cut.

Can anyone see what could be wrong? Tried ping delays, pause, /wait - all to the same effect.

@echo Off

Set program=c:\rtdm_cutter.exe

(
echo 20121126_191613_09224_RTDM.BIN
echo 2012/11/25 15:00:00
echo 2012/11/25 15:15:00
echo y
) |start /realtime /B /wait %program%

解决方案

Try this:

CALL "c:\rtdm_cutter.exe" 20121126_191613_09224_RTDM.BIN "2012/11/25 15:00:00" "2012/11/25 15:15:00" y


这篇关于Windows批处理文件和可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆