d***2 发帖数: 7 | 1 I've got some files named like "c:\data set0.txt", "c:\data set1.txt"... (
there is a space between "data" and "set"), how can i pass them as
parameters as in the following script.
REM ----begin------
for /F %%i in (`dir c:\*.txt`) do call :run_file "%%i"
goto :eof
echo %1
some_command %1
REM -----end -----
The console complains, and it seems, because of the file names are not
passed through complete to the procedure :run_file, but only the first part
of it "c:\data".
Can anyone here tell me how | p***o 发帖数: 1252 | 2 FOR /F "usebackq delims=" %i IN (`dir c:\*.txt /b`) DO @echo "%i"
【在 d***2 的大作中提到】 : I've got some files named like "c:\data set0.txt", "c:\data set1.txt"... ( : there is a space between "data" and "set"), how can i pass them as : parameters as in the following script. : REM ----begin------ : for /F %%i in (`dir c:\*.txt`) do call :run_file "%%i" : goto :eof : echo %1 : some_command %1 : REM -----end ----- : The console complains, and it seems, because of the file names are not
| d***2 发帖数: 7 | |
|