`

CALL SET FOR

    博客分类:
  • bat
 
阅读更多
CALL 帮助文档 写道
Calls one batch program from another. #调用其他地方的一段batch程序

CALL [drive:][path]filename [batch-parameters] #<==命令使用格式

batch-parameters Specifies any command-line information required by the
batch program. #指定batch程度需要的命令行信息。

If Command Extensions are enabled CALL changes as follows:

CALL command now accepts labels as the target of the CALL. The syntax
is:
#Call命令接受字符串作为Call的目标。语法如下:

CALL :label arguments

A new batch file context is created with the specified arguments and
control is passed to the statement after the label specified. You must
"exit" twice by reaching the end of the batch script file twice. The
first time you read the end, control will return to just after the CALL
statement. The second time will exit the batch script. Type GOTO /?
for a description of the GOTO :EOF extension that will allow you to
"return" from a batch script.

#一个新的内容包含指定参数batch文件被创建,控制权is passed到指定文本的语句。你必须
“退出” 2次才到达batch脚本文件2次。第一次,你读到文件的末尾,控制权会转移到call后面的语句。
第一次会退出batch脚本。 Type GOTO /? 查看GOTO的描述 :EOF 拓展会运行你从一个batch脚本中
返回。

In addition, expansion of batch script argument references (%0, %1,
etc.) have been changed as follows:
另外,拓展的batch脚本参数引用已经改变如下:


%* in a batch script refers to all the arguments (e.g. %1 %2 %3
%4 %5 ...)

Substitution of batch parameters (%n) has been enhanced. You can
now use the following optional syntax:

%~1 - expands %1 removing any surrounding quotes (") #删除引号
%~f1 - expands %1 to a fully qualified path name #扩充到路径
%~d1 - expands %1 to a drive letter only #扩充到 盘符
%~p1 - expands %1 to a path only #扩充到 路径
%~n1 - expands %1 to a file name only #扩充到 文件名
%~x1 - expands %1 to a file extension only #扩充到 文件拓展类型
%~s1 - expanded path contains short names only #扩充到 路径包含的文件名
%~a1 - expands %1 to file attributes # 文件属性
%~t1 - expands %1 to date/time of file #文件时间
%~z1 - expands %1 to size of file #文件大小
%~$PATH:1 - searches the directories listed in the PATH
environment variable and expands %1 to the fully
qualified name of the first one found. If the
environment variable name is not defined or the
file is not found by the search, then this
modifier expands to the empty string

#查找文件目录列表在指定的PATH环境变量参数和拓展到第一次发现的【修饰名】。
如果环境变量名没有定义或者文件没有被搜索到,这个修改就会拓展成空字符串。

The modifiers can be combined to get compound results:
#修改可以被联合使用得到复合的结果。

%~dp1 - expands %1 to a drive letter and path only
%~nx1 - expands %1 to a file name and extension only
%~dp$PATH:1 - searches the directories listed in the PATH
environment variable for %1 and expands to the
drive letter and path of the first one found. #在环境变量中查找具有盘符和路径的文件夹列表
%~ftza1 - expands %1 to a DIR like output line

In the above examples %1 and PATH can be replaced by other
valid values. The %~ syntax is terminated by a valid argument
number. The %~ modifiers may not be used with %*
#在上面的例子中,%1 和 PATH可以用其他有效的值来代替。
%~ 语法 是以一个有效的数值参数结尾的。
%~修饰语不能使用%*

 

分享到:
评论

相关推荐

    批处理基础 FOR命令详解 批处理中的变量 set命令详解 if命令讲解 DOS编程高级技巧

    * 用 set 命令进行字符串处理:set命令可以用于进行字符串替换和截断。 五、if 命令讲解 IF命令用于判断条件语句。 * 第一种用法:IF [NOT] ERRORLEVEL number command * 第二种用法:IF [NOT] string1==string2 ...

    SETRES

    call SETRES.exe %res% echo 分辨率已更改为%res%。 ) else ( echo 更改取消。 ) ) ``` 在上面的脚本中,用户首先被提示输入期望的分辨率和刷新率,然后脚本会检查当前的分辨率是否与输入的相同。如果不同,...

    Pro Draw Call Optimizer 4.1

    Pro draw call is an editor extension that will easily reduce your draw calls by creating atlases for your models so they can share materials for static/dynamic batching. Custom shaders?, no worries, ...

    Android代码-倒计时效果数字变化动画

    Just need to call setNumber() could be performed. You can dynamically customize number's colors、size、range、font... Dependency There are two ways: clone this project, and use as dependency just ...

    JAVA动态对象装配实现 测试--初步实现bean的set/get功能

    for (Map.Entry, Object&gt; entry : properties.entrySet()) { Field field = obj.getClass().getDeclaredField(entry.getKey()); field.setAccessible(true); // 允许访问私有字段 field.set(obj, entry.getValue...

    Devart dbForge Studio for MySQL Professional Edition v7.1.13

    The first debugger for MySQL that offers step-by-step code execution, breakpoints,watches, a call stack, a variables evaluation mechanism to automate debugging of MySQL stored routines and triggers ...

    批处理For语句从入门到精通(完整版)

    结合其他流程控制语句如`if`、`call`、`goto`等,`for`语句让批处理脚本变得更加灵活和智能。因此,掌握`for`语句不仅能够显著提升脚本的质量,还能提高编程效率。 本书作者namejm是一位资深的批处理程序员,他在...

    简历关键数据提取器

    for %%i in ("%cd%") do set person=%%~ni echo name age name2 id mail phone &gt;%person%.txt cd. &gt;p.txt for /f "tokens=1,2 delims= " %%i in ('dir/b 51*.txt') do ( set t=%%i echo t=!t! call echo ...

    Android代码-StatusView

    Then call status method statusView.setStatus(Status.LOADING); statusView.setStatus(Status.ERROR); statusView.setStatus(Status.COMPLETE); statusView.setStatus(Status.IDLE); //hide status If you want to...

    delphi socket call php socket 例子

    delphi socket call php socket 例子,可根据需要扩展写成聊天室、网站助理类似淘宝助理,有订单提醒。 //确保在连接客户端时不会超时 set_time_limit(0); $port = 10081 ; $ip = '192.168.1.102'; // create ...

    高中英语选修八语言点PPT学习教案.pptx

    - `call for`:需要,要求 - `call on`:号召,拜访(人) - `call at`:拜访(某地) - `distinguish`:辨别,区别 - `distinguish oneself`:显扬自己,使自己扬名 - `distinguished`:著名的,闻名的 - `...

    8086~80486_InstructionSet ;8086到80486指令集(英文版)

    17. **CALL - Procedure Call**:过程调用指令,用于调用子程序。 18. **CBW - Convert Byte to Word**:将字节转换成字指令。 19. **CDQ - Convert Double to Quad (386+)**:将双字转换成四字指令。 20. **CLC - ...

    80c51 Caculator

    Set output mode (floating point). call boundsbuffer ; Initialise the bounds buffer - used for error checking. mov mode,#4 ; Initialise the constant buffer to 100. Primarily used for % ops. ...

    Google Cloud Speech Recognition 3.0

    For set the list of arrays of speech contexts you can call this method: Frostweep Games, 2017 _speechRecognition is an instance of GCSpeechRecognition class: If you want to set language you can call ...

    Serial Programming Guide for POSIX Operating Systems

    - **Selecting Input from a Serial Port**: Using the `select()` system call to monitor multiple file descriptors for input readiness. This is useful for non-blocking I/O operations and handling ...

    FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持D4-XE5

    + [enterprise] added property "Reports" - "MaxReports" in server configuration - set the limit of maximum report threads, set 0 for unlimit + [enterprise] added property "Logs" - "SchedulerLog" in ...

    纯asp写的柱状图,折线图,正弦曲线图,波形图

    Set objGraph = New PureAspGraph Call objGraph.setYAxesTitle("Abs(Sin(i/64.0))*9 And Abs(Cos(i/32.0))*9") Call objGraph.setTitle("Very detailed demonstration") 'Adds data Call objGraph.setData...

    Administrator Guide for Avaya Communication Manager

    Its comprehensive set of features, combined with robust management tools and seamless integration capabilities, make it an ideal solution for organizations seeking to enhance their communication ...

Global site tag (gtag.js) - Google Analytics