My first BAT has the following written:
call 2.bat * txt c:\a
The second one is written like this:
@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
That is, passing the parameters from the first one to the second one. The problem is here. I now want to directly write the parameters in the second one without using the first one as a medium to complete the automatic renaming. Is there any expert who knows how to define variables? Well!! You can also give the code!! Thank you
It is best to give a simple example
[ Last edited by namejm on 2007-2-5 at 01:58 PM ]
call 2.bat * txt c:\a
The second one is written like this:
@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
That is, passing the parameters from the first one to the second one. The problem is here. I now want to directly write the parameters in the second one without using the first one as a medium to complete the automatic renaming. Is there any expert who knows how to define variables? Well!! You can also give the code!! Thank you
It is best to give a simple example
[ Last edited by namejm on 2007-2-5 at 01:58 PM ]
