- May
- 47
- 0
I ran an old v15-era batch file in v19 yesterday and got some unexpected results. I got the information I expected but in the wrong order. Some investigation quickly revealed that the sorting option I use on the batch's DO command isn't being honored in v19. It can easily be tested at the command line:
Instead of being sorted by extension, the file list always comes back in alphabetical (by name) order. I also tried /O:S for a size sorting and /O:D for a date sorting but all I ever get back is a name sorting, as though I hadn't used the /O option at all. The same commands issued in v15 all sort properly. For what it's worth, other commands I tried that sort (e.g., DIR, FOR and SELECT) work as expected. Only DO seemed to have the issue in my limited testing.
Rex, I know all your current efforts are focused on v20 but if this is indeed a bug in v19, I hope it's not asking/hoping too much for a fix to the current version. I don't want to have to upgrade to the next major version right now simply because I found a bug right at the end of v19's life. Thanks in advance if you're willing to address this.
Code:
do f in /o:e * (echo %f)
Instead of being sorted by extension, the file list always comes back in alphabetical (by name) order. I also tried /O:S for a size sorting and /O:D for a date sorting but all I ever get back is a name sorting, as though I hadn't used the /O option at all. The same commands issued in v15 all sort properly. For what it's worth, other commands I tried that sort (e.g., DIR, FOR and SELECT) work as expected. Only DO seemed to have the issue in my limited testing.
Rex, I know all your current efforts are focused on v20 but if this is indeed a bug in v19, I hope it's not asking/hoping too much for a fix to the current version. I don't want to have to upgrade to the next major version right now simply because I found a bug right at the end of v19's life. Thanks in advance if you're willing to address this.