如何创建和访问单个的独立批处理文件 [英] How to Create and Access a Separate batch file of a Single
本文介绍了如何创建和访问单个的独立批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的批处理文件获取这么久
My Batch File is Getting so Long
我可以做出一些单独的文件中相同的批处理程序
Can I make a Some Separate Files for That Same Batch Program
如同
@echo off
:top
set /p cmd=
if {condition} goto Condition1
if {conditoin} goto Condition2
if ................ and so on
我的批处理文件这么长时间你无法想象
My Batch File Is So Long You Can't Imagine
我想
:Condition1
{Planning}
goto top
:Condition2
{planning}
goto top
在一个单独的文本文件
我能做些什么????
What Can i Do ????
推荐答案
放入系统所有的子程序在一个文件?
all thoses "subroutines" in one file?
@echo off
goto %1
goto :eof
:Condition1
{Planning}
goto :eof
:Condition2
{planning}
goto :eof
在您的main.bat:
in your main.bat:
if {condition} call subroutines.bat Condition1
这篇关于如何创建和访问单个的独立批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文