是否有可能从现有的新的批处理文件?例如用Java,C ++ pretty以外的其他语言,我可以运行一个.exe文件,并创建独立code不同的.exe文件。这是可能的批处理文件怎么办?
比方说,我想test.bat的是这个
回声你好你好和我想它来创建另外一个bat文件名为这test2.bat将包含此:
回声喜喜解决方案
您可以使用的呼应并输出重定向到一个批处理文件:
-
test.bat的
关闭@echo@echo你好你好@echo回声喜喜> test2.bat@echo回声追加东西>> test2.bat
一> 以创建/覆盖已经存在的任何文件;两个方式> 字符追加到文件
Is it possible to create a new batch file from an existing? For example in Java, C++ pretty much any other language I can run one .exe and create a different .exe with separate code. Is this possible to do in batch files?
Let's say I want test.bat to be this
echo hello helloand I want it to create another .bat file called test2.bat which will contain this:
echo hi hi解决方案
You can use echo and redirect the output to a batch file:
test.bat
@echo off @echo hello hello @echo echo hi hi > test2.bat @echo echo append something >> test2.bat
One > to create/overwrite any file that already exists; two > characters to append to the file.
更多推荐
从创建批处理文件新的批处理文件
发布评论