1

I know that to output all images (.png) in a single folder is

dir *.png

but I can't figure out how to check my whole hardrive (all folders and subfolders) for .png files.

Thank you.

  • 1
    Add the /S switch to your dir command. – FastEthernet May 28 '17 at 18:05
0

I can't figure out how to check my whole hardrive for .png files.

You need to use the /s (include all subfolders) option.

You might also want to consider using /b (Bare format (no heading, file sizes or summary)) as well.

Examples

To search the whole of drive C:

cd /d c:\
dir /s /b *.png

To search the whole of drive C, and save the output:

cd /d c:\
dir /s /b *.png > files.txt

Further Reading

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.