- Jul
- 20
- 1
I'm trying to write a script to delete all of the unnecessary installation subdirectories that steam usually leaves behind after a newly-installed program has completed its setup. Typically, these are found in a subdirectory off of each game's main directory named "_CommonRedist". The bug I'm seeing is that if I run the following command from a higher-level directory:
it lists the contents of every subdirectory named "common" after encountering the first subdirectory actually named "_CommonRedist". For example, in the following hierarchy:
running the above command from d:\ does _not_ list the dir1\common subdirectory, does list the dir2\_CommonRedist subdirectory, and then lists both the dir3\common and dir4\sub2\common subdirectories. I have tried other variations of _CommonRedist even including "*_CommonRedist" and "_CommonRedist*" and none of them display the same behavior. I have been able to recreate this on two different drives that have both been chkdsk'd (to verify that there wasn't some type of directory corruption) and I simply cannot explain what is happening. I have also checked my aliases, environment variables, paths, and junctions to make sure there wasn't a tertiary cause but I am unable to find any reason for this to occur.
Running on TCC 21.00.39 x64 Windows 10 [Version 10.0.15063]
dir "_CommonRedist" /s
it lists the contents of every subdirectory named "common" after encountering the first subdirectory actually named "_CommonRedist". For example, in the following hierarchy:
d:\
├ dir1
├ dir1
├ sub1
├ sub2
├ common
├ dir2├ sub2
├ common
├ sub1
├ sub2
├ _CommonRedist
├ dir3├ sub2
├ _CommonRedist
├ sub1
├ common
├ dir4├ common
├ sub1
├ sub2
├ sub2
├ common
running the above command from d:\ does _not_ list the dir1\common subdirectory, does list the dir2\_CommonRedist subdirectory, and then lists both the dir3\common and dir4\sub2\common subdirectories. I have tried other variations of _CommonRedist even including "*_CommonRedist" and "_CommonRedist*" and none of them display the same behavior. I have been able to recreate this on two different drives that have both been chkdsk'd (to verify that there wasn't some type of directory corruption) and I simply cannot explain what is happening. I have also checked my aliases, environment variables, paths, and junctions to make sure there wasn't a tertiary cause but I am unable to find any reason for this to occur.
Running on TCC 21.00.39 x64 Windows 10 [Version 10.0.15063]