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. 人物FSM

    人物有限状态机 之前看这个状态机没看懂,今天又翻出来,看的略懂 FSM在游戏中应用的地方还是挺多的 怪物AI,玩家行为管理 条件(包含若干事件) 条件(包含若干事件) 状态1<--------- ...

  2. poj3096

    C++的标准模版库的应用 Surprising Strings Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6625   ...

  3. Coursera课程《Machine Learning》学习笔记(week1)

    这是Coursera上比较火的一门机器学习课程,主讲教师为Andrew Ng.在自己看神经网络的过程中也的确发现自己有基础不牢.一些基本概念没搞清楚的问题,因此想借这门课程来个查漏补缺.目前的计划是先 ...

  4. 为什么调用 GdiplusShutdown 函数会在 DllExports::GdipDeleteGraphics(nativeGraphics) 位置抛出异常?

    因为没有仔细看文档 https://docs.microsoft.com/en-us/windows/desktop/api/Gdiplusinit/nf-gdiplusinit-gdiplusshu ...

  5. ThinkPHP在入口文件中判断是手机还是PC端访问网站

    <?php// +----------------------------------------------------------------------// | ThinkPHP [ WE ...

  6. python多进程理论

    什么是进程 进程:正在进行的一个过程或者说一个任务.而负责执行任务则是cpu. 举例(单核+多道,实现多个进程的并发执行): 你在一个时间段内有很多任务要做:python学习的任务,赚钱的任务,交女朋 ...

  7. centos添加定时任务

    安装crontab: yum install crontabs 查看crontab服务状态:service crond status 手动启动crontab服务:service crond start ...

  8. bzoj3007 解救小云公主

    3007: 解救小云公主 Time Limit: 5 Sec  Memory Limit: 512 MB Submit: 159  Solved: 71 [id=3007" style=&q ...

  9. 关于服务器jdk版本和代码编译调试兼容问题

    首先代码是基于哪个版本编写和调试,有没有用到新版本jdk新的特性,类啊接口啊啥的,用到了的话,就不行了 其他都共有的是向下兼容的 最好开发环境的jdk版本和部署环境的jdk版本匹配.

  10. django的模板系统过滤器笔记

    -------------------django内建的过滤器-------------------1.add 使用形式为:{{ value | add: "2"}}意义:将val ...