Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如何创建和访问单个文件的单独批处理文件_Batch File_Cmd - Fatal编程技术网

Batch file 如何创建和访问单个文件的单独批处理文件

Batch file 如何创建和访问单个文件的单独批处理文件,batch-file,cmd,Batch File,Cmd,我的批处理文件太长了 我可以为同一批处理程序制作一些单独的文件吗 像 我的批处理文件太长了,你无法想象 我想要 :Condition1 {Planning} goto top :Condition2 {planning} goto top 在单独的文本文件中 我能做什么???所有这些“子程序”都放在一个文件中 @echo off goto %1 goto :eof :Condition1 {Planning} goto :eof :Condition2 {planning} goto :eof

我的批处理文件太长了

我可以为同一批处理程序制作一些单独的文件吗

我的批处理文件太长了,你无法想象

我想要

:Condition1
{Planning}
goto top
:Condition2
{planning}
goto top
在单独的文本文件中

我能做什么???

所有这些“子程序”都放在一个文件中

@echo off
goto %1
goto :eof
:Condition1
{Planning}
goto :eof
:Condition2
{planning}
goto :eof
在main.bat中:

if {condition} call subroutines.bat Condition1

if{condition}在所有这些
if
s之后调用condition1.bat和
goto:top
if {condition} call subroutines.bat Condition1