DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: create a list of paths to a speific subfolder name underneath a parent folder  (Read 4,530 times)

questorfla

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
Short of loading up on GNU commands is there an easy way to do this?  MS completely left out all ability to specify any boundaries on the "dir" or "search" or any other windows/dos commands.  I need a list of all the paths to subfolders named "cache" underneath a parent folder.  Most are at the 2nd level and none are more then 3 or 4.  I had thought maybe Dos "find" might do it but they have no recursive abilities or if they do they won't for me.  I end up being the one doing al the "curs" ing  :) instead.  I also tried to preload the Utility "everything" to just look for every occurrence of that name using the Parent folder as a starting point but for some reason even that doesn't want to cooperate.
If I run the search inside the parent, there will be many of these subfolders named "cache".  While the cache subfolder may contain other subfolders I only need to get a list of paths to the top level "cache" subfolder.  A simple text file would be nice showing the full path all the3 way back to c:\.

questorfla

  • Fighting Slime all the Time
  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 570
MasterSeeker 1.2!  THAT is exactly what I needed!  
WOW  I found my own answer almost immediately right here on DC!


BEST Place to find the answers to Anything!
:) :P
>>And that is not just an unwarranted  "Plug" for you  DxCK  it really DOES do things nothing else would!
« Last Edit: January 05, 2015, 04:26 AM by questorfla »

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
dir "cache" /s /ad /b >somefile.txt

Run it from the parent directory.

Code: (generic)
C:\Program Files (x86)\Steam\steamapps\common\farcry\Shaders\Cache
C:\Program Files (x86)\Steam\steamapps\common\farcry\Shaders\HWScripts\Declarations\CGPShaders\Cache
C:\Program Files (x86)\Steam\steamapps\common\farcry\Shaders\HWScripts\Declarations\CGVShaders\Cache
C:\Program Files (x86)\Steam\steamapps\common\penumbra overture\redist\core\cache
C:\ProgramData\Microsoft\Windows\DRM\Cache
C:\Users\4wd\AppData\Local\dxhr\cache
C:\Users\4wd\AppData\Local\Microsoft\Terminal Server Client\Cache
C:\Users\4wd\AppData\Local\Microsoft\Windows Store\Cache
C:\Users\4wd\AppData\Local\NuGet\Cache
C:\Users\4wd\AppData\Local\Origin\Origin\cache
C:\Users\4wd\AppData\Local\Packages\winstore_cw5n1h2txyewy\LocalState\Cache
C:\Users\4wd\AppData\LocalLow\Sun\Java\Deployment\cache
C:\Users\All Users\Microsoft\Windows\DRM\Cache
C:\Windows\System32\spp\store\2.0\cache
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903
« Last Edit: January 04, 2015, 06:27 AM by 4wd »

Original address: https://www.donationcoder.com/forum/index.php?topic=39945.0