https://stackoverflow.com/questions/2252979/windows-batch-call-more-than-one-command-in-a-for-loop

Using & is fine for short commands, but that single line can get very long very quick. When that happens, switch to multi-line syntax.

FOR /r %%X IN (*.txt) DO (
ECHO %%X
DEL %%X
)

Placement of ( and ) matters. The round brackets after DO must be placed on the same line, otherwise the batch file will be incorrect.

See if /?|find /V "" for details.

Windows batch: call more than one command in a FOR loop?的更多相关文章

  1. jenkins 如何处理windows batch command

    这两天一直被一个问题困扰. 在jenkins的windows batch command 测试好的,拿到bat文件中,再从Execute Windows Batch command 中调用这个bat, ...

  2. Build step 'Execute Windows batch command' marked build as failure

    坑爹的Jenkis,在执行windows命令编译.NET项目的时候命令执行成功了,但是却还是报了这样一个错: Build step 'Execute Windows batch command' ma ...

  3. Windows batch,echo到文件不成功,只打印出ECHO is on.

    jenkins 执行Windows batch command的时候,如果想要读写文件,echo到文件不成功. bat 代码如下: set ctime=%date%_%time% echo %ctim ...

  4. windows batch语法

    windows BATCH基本知识扩展名是bat(在nt/2000/xp/2003下也可以是cmd)的文件就是批处理文件. ==== 注 =============================== ...

  5. Use windows batch script to create menu

    Background Recently, I find that we need  to  type some very long gradle commands to run build, chec ...

  6. 深入浅出Windows BATCH

    1.什么是Windows BATCH BATCH也就是批处理文件,有时简称为BAT,是Windows平台上的一种可运行脚本,与*nix(Linux和Unix)上的Shell脚本和其它的脚本(Perl, ...

  7. Windows Batch 编程 和 Powershell 编程

    Batch Script - Functions with Return Values https://www.tutorialspoint.com/batch_script/batch_script ...

  8. CCNET+ProGet+Windows Batch搭建全自动的内部包打包和推送及管理平台

    所要用的工具: 1.CCNET(用于检测SVN有改动提交时自动构建,并运行nuget的自动打包和推送批处理) 2.ProGet(目前见到最好用的nuget内部包管理平台) 3.Windows Batc ...

  9. Create Windows Server 2008 cluster from the command line

    How to create a Windows Server 2008 cluster from the command line? Creating a cluster in Server 2008 ...

随机推荐

  1. MySQL内连接查询

    1.语法: select 字段列表 from table1,table2 where 子句: select 字段列表 from table1 as 别名1 inner join table2 as 别 ...

  2. scrapy 简介

    Scrapy是用纯Python实现一个为了爬取网站数据.提取结构性数据而编写的应用框架. Scrapy架构图(绿线是数据流向): Scrapy Engine(引擎): 负责Spider.ItemPip ...

  3. for循环的执行循序

    先上一段代码,大家说出此方法的执行结果: public class Print{ static boolean out(char c){ System.out.println(c); return t ...

  4. java编程:将数组的第一个为最大第二个为最小以此类推

    import java.util.Scanner; public class Max_Min { public static void main(String[] args) { int[] a = ...

  5. linux 下 Shell编程(三)

    if语句应用实例 if语句可以在程序中实现各种逻辑判断. 用if语句判断并显示文件的信息 可以用test命令和相关的参数来判断文件的属性,然后根据判断结果输出文件的信息. #!/bin/bash #4 ...

  6. JSON Extractor/jp@gc - JSON Path Extractor 举例2

    测试描述 使用json返回结果做校验 测试步骤 1.配置http请求 2.根据结果树返回的json,取值 { "status_code":200, "message&qu ...

  7. 《PhotoShop CS6 》第一节 矢量与分辨率

    分辨率:不一定是方形,可以调整其比例. 色彩模型:色相Hue(圆周,冷暖相接),饱和度Saturation(半径),明度Brightness(轴,从黑到白).

  8. HTML学习笔记——标准网页设计+使用CSS、Javascript

    一.标准网页设计 1.标准网页概述: 标准网页设计要遵循,内容与表现相分离.   内容 + 表现 = 页面  ---  即 :XHTML + CSS = PAGE 内容与变现相分离,也就是内容使用HT ...

  9. Javascript中的函数中的this值

    看下面这段代码会在控制台上输出什么内容? <script> var url="fang.com"; var obj={ url:"soufun.com&quo ...

  10. javascript数组遍历for与for in区别详解

    js中遍历数组的有两种方式 复制代码代码如下: var array=['a']//标准的for循环for(var i=1;i<array.length;i++){    alert(array[ ...