M
[email protected]
Guest
Here is a small .bat file that works as expected:
On Break GoTo Finish
SetLocal
For /R C:\Windows /D %E in (*) Do (
Echo %E
)
:Finish
EndLocal
Quit 0
The output from this .bat file is a list of Windows directories and their subdirectories.
Following is a some-what modified version of above (and an example from a "real" .bat file):
On Break GoTo Finish
SetLocal
Set S=C:\Windows
For /R %S /D %E in (*) Do (
Echo %E
)
:Finish
EndLocal
Quit 0
Here is the output from "sample" .bat file:
On Break GoTo Finish
SetLocal
Set S=C:\Windows
For /R %S /D %E in (*) Do ( Echo %E )
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
repeated idefinitely.
Is this an implication that the "range" parameter can not be a variable? What am I missing here?
TCC 9.02.152 Windows Vista [Version 6.0.6001]
On Break GoTo Finish
SetLocal
For /R C:\Windows /D %E in (*) Do (
Echo %E
)
:Finish
EndLocal
Quit 0
The output from this .bat file is a list of Windows directories and their subdirectories.
Following is a some-what modified version of above (and an example from a "real" .bat file):
On Break GoTo Finish
SetLocal
Set S=C:\Windows
For /R %S /D %E in (*) Do (
Echo %E
)
:Finish
EndLocal
Quit 0
Here is the output from "sample" .bat file:
On Break GoTo Finish
SetLocal
Set S=C:\Windows
For /R %S /D %E in (*) Do ( Echo %E )
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
Z:\SampleC.bat [6] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /R [p
repeated idefinitely.
Is this an implication that the "range" parameter can not be a variable? What am I missing here?
TCC 9.02.152 Windows Vista [Version 6.0.6001]