空间批处理文件路径 [英] Space in batch file path
问题描述
我想运行一个简单的批处理文件。
FOR / F %%一个IN('DIR / B / S%〜DP0 \\ EnsembleIndependant \\ *错。')DO(ECHO %% A>> ResultatVorace .TXT和放大器; CALL vorace.exe -f %% A>> ResultatVorace.txt)
如果在批处理文件的路径没有空格这仅适用。
该批次是:
C:\\用户\\拉斐尔\\文档\\ Visual Studio 2012中\\项目\\ vorace \\发布\\ vorace.exe
我要循环的文件,通过在:
C:\\用户\\拉斐尔\\文档\\ Visual Studio 2012中\\项目\\ vorace \\发布\\ EnsembleIndependant
谁能帮助我。
感谢。
感谢您的建议家伙。
FOR / Fdelims =解决了我的问题。
FOR / Fdelims =%%一个IN('DIR / B / S%〜dp0EnsembleIndependant \\ *。 .mis')DO(ECHO %% A>> ResultatVorace.txt&安培; CALL vorace.exe -f %% A>> ResultatVorace.txt)
%〜DP0
早已在最后一个退格。
I'm trying to run a simple batch file.
for /f %%a IN ('dir /b /s "%~dp0\EnsembleIndependant\*.mis"') DO (ECHO %%a >> ResultatVorace.txt & CALL vorace.exe -f %%a >> ResultatVorace.txt)
this only works if there is no space in the path of the batch file.
the batch is in:
C:\Users\Rafael\Documents\Visual Studio 2012\Projects\vorace\Release\vorace.exe
the files I want to loop through are in:
C:\Users\Rafael\Documents\Visual Studio 2012\Projects\vorace\Release\EnsembleIndependant
can anyone help me.
thanks.
thank you guys for the suggestions. for /f "delims=" solved my problem.
for /f "delims=" %%a IN ('dir /b /s "%~dp0EnsembleIndependant\*.mis"') DO (ECHO %%a >> ResultatVorace.txt & CALL vorace.exe -f %%a >> ResultatVorace.txt)
%~dp0
has already a backspace at the end.
这篇关于空间批处理文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!