我的第一个BAT中写的是这样
call 2.bat * txt c:\a
第二中写的是这样
@echo off
if {%1}=={} goto :useageexit
if {%2}=={} goto :useageexit
if {%3}=={} goto :useageexit
for /R %3 %%v IN (%1.%2) DO (
call:rn %%v
)
:rn
if %1==* exit
ren %1 *.doc
就是说把第一个中的参数传到二中 问题就在这里 我现在想在二中直接写
入参数 不需要一来做媒介来完成自动改名 可有高手知道如何定义变量
不!! 给代码也行!!谢谢
最好能给出一个简单点的例子
[ Last edited by namejm on 2007-2-5 at 01:58 PM ]
call 2.bat * txt c:\a
第二中写的是这样
@echo off
if {%1}=={} goto :useageexit
if {%2}=={} goto :useageexit
if {%3}=={} goto :useageexit
for /R %3 %%v IN (%1.%2) DO (
call:rn %%v
)
:rn
if %1==* exit
ren %1 *.doc
就是说把第一个中的参数传到二中 问题就在这里 我现在想在二中直接写
入参数 不需要一来做媒介来完成自动改名 可有高手知道如何定义变量
不!! 给代码也行!!谢谢
最好能给出一个简单点的例子
[ Last edited by namejm on 2007-2-5 at 01:58 PM ]

