制作批处理文件以写入批处理文件 [英] Making batch file to write batch file
本文介绍了制作批处理文件以写入批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是如何在批处理文件中写入批处理文件,在运行时会创建新的批处理文件?"
My question is 'How to write batch file in batch file,that will create new batch file when ran?'
喜欢这个:
echo systeminfo >> info.txt >> SystemInfo.bat
我将不需要新的批处理文件( SystemInfo.bat ),当运行时,该批处理文件将创建 Info.txt ,且其中包含系统信息.
I wan't new batch file (SystemInfo.bat) that will,when run create Info.txt,with system info in.
对此有什么解决办法吗?
Is there any solution to this?
推荐答案
您将必须转义特殊字符:
you will have to escape special chars:
echo systeminfo ^>^>info.txt >>SystemInfo.bat
这篇关于制作批处理文件以写入批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文