17

I know that to display alternate data streams of all the files (if any) in command prompt, this is the command dir /R. But, how do I do it if I only want to display files that have alternate data streams?

npocmaka
  • 55,367
  • 18
  • 148
  • 187
csharpnewbie
  • 421
  • 1
  • 9
  • 18

1 Answers1

22
dir   /s /r | findstr /e ":$DATA"

or

dir   /r | findstr /e ":$DATA"

the first will search in all sub-directories.The second only in current folder. These will show also the ADS assigned to the directory.For only files:

dir /a-d  /s /r | findstr /e ":$DATA"
npocmaka
  • 55,367
  • 18
  • 148
  • 187
  • What if the alternate stream is named something other than ":$DATA"? What about ":HIDDEN" or ":MALWARE", etc.? – Jim JR Harris Apr 01 '23 at 15:34
  • @JimJRHarris - try this: `(echo #>:ads) && (dir /r /s)` - all alternate data streams end with `$DATA` when dir command is used. – npocmaka Apr 01 '23 at 18:56