【发布时间】:2012-09-26 21:04:35
【问题描述】:
我想从我正在运行的批处理文件中创建另一个文件输出,这意味着原始内容在其中。在这个批处理文件中,它会执行一段时间或 for 循环,直到找到“结束”或我在内容末尾添加的任何唯一单词。
我不想简单地复制文件(包含重要内容),因为这会暴露信息。然后通过批处理调用文件来运行它。
code:
-start of batch
-check if the file a.txt exist del a.txt
-starts to create the a.txt file
>start of content:
>"the quick brown fox jump over the lazy dog"
>lynx: unique word
>end of content
-writes the content to a.txt using for loop or while until it finds the unique word
-runs the a.txt file
-deletes the a.txt file
-exit
希望有人可以提供帮助。谢谢! 或者,如果有人可以提出更好的方法来做到这一点。我会很感激的
【问题讨论】:
-
为什么需要新建批处理文件?为什么不简单地将代码作为现有批处理文件中的函数调用?
标签: file for-loop batch-file while-loop creation