batch-filecmdstreampromptalternate

How to display only files that have alternate data streams in Command Prompt


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?


Solution

  • 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"