批次:在报价执行命令循环与管道找到 [英] Batch: Execute command with quotes in for loop with piping to find

查看:213
本文介绍了批次:在报价执行命令循环与管道找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能否请你告知如何修正以下命令,该命令从SVN删除未版本化项目

Could you please advise how to fix command below, which removes unversioned items from svn

rem @echo off
for /f "tokens=2*" %%i in ('"c:\Program Files\TortoiseSVN\bin\svn.exe" status --no-ignore ^| find "?"') do echo %%i

下面变种没有路径如下:

variant below without path works:

rem @echo off
for /f "tokens=2*" %%i in ('svn.exe status --no-ignore ^| find "?"') do echo %%i

但我需要通过整个路径与svn.exe。在这种情况下,输出C:\\程序是不是一个有效的程序

but i need to pass entire path with svn.exe. In this case it outputs C:\Program is not a valid program

推荐答案

尝试这样的:

   for /f "usebackq tokens=2*" %%i in (`"c:\Program Files\TortoiseSVN\bin\svn.exe" status --no-ignore ^| find "?"`) do echo %%i

这篇关于批次:在报价执行命令循环与管道找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆