I am running Take Command 19.00.28. I just ran into a rather strange behavior of the DO command, in combination with the /O option. Suppose that you create a C:\Test directory, and a bunch of random subdirectories under it:
The directory will look somewhat like this:
Now save the following in a btm file, say "test.btm":
If you run test.btm, the first DO loop will enumerate everything, but the second will stop at the first entry! The output is:
I am pretty sure that it worked OK in Take Command 18, but maybe something was always incorrect in the way the second DO command was invoked? Or is this a new bug?
Please enlighten me. :)
Code:
md C:\Test
cdd C:\Test
md Foo Bar Baz
Code:
2016-01-07 22:59 <DIR> Bar
2016-01-07 22:59 <DIR> Baz
2016-01-07 22:59 <DIR> Foo
Code:
@echo off
echo Enumerating directory without /o:
do i in /a: *.*
echo Found: %i
enddo
echo Enumerating directory with /o:
do i in /a: /o:ne *.*
echo Found: %i
enddo
Code:
Enumerating directory without /o:
Found: Bar
Found: Baz
Found: Foo
Found: test.btm
Enumerating directory with /o:
Found: Bar
Please enlighten me. :)