由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - windows script parameter with spaces
相关主题
请教一个mitbbs网页检索URL的问题[合集] C代码这么写,居然没有错。
Default function template arguments[合集] goto in C
ajax小问题请推荐好的c++下的matrix库
question about using Hive parameter (转载)两个关于matrix的问题请教
[合集] can a single thread run into deadlock?*********VBA Macro 打开 Excel 问题.***********
vbscript 转换excel文件到csv文件格式问题?C Shell 里真的没法自定义函数吗?
要写 Visual C 下的 DLL 东西同步编程真郁闷
C语言程序静态库和动态库的创建及其应用看了一下C#的async await
相关话题的讨论汇总
话题: script话题: data话题: rem话题: spaces话题: parameter
进入Programming版参与讨论
1 (共1页)
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
3
cool!! thx!
1 (共1页)
进入Programming版参与讨论
相关主题
看了一下C#的async await[合集] can a single thread run into deadlock?
展示一下苹果的bugvbscript 转换excel文件到csv文件格式问题?
日本人做科研的style (转载)要写 Visual C 下的 DLL 东西
scala的pattern match就一switch吧。C语言程序静态库和动态库的创建及其应用
请教一个mitbbs网页检索URL的问题[合集] C代码这么写,居然没有错。
Default function template arguments[合集] goto in C
ajax小问题请推荐好的c++下的matrix库
question about using Hive parameter (转载)两个关于matrix的问题请教
相关话题的讨论汇总
话题: script话题: data话题: rem话题: spaces话题: parameter