kiss my armpit
kiss my armpit

Reputation: 3519

How to list all PNG images in a sub directory?

Let sub dir be my sub directory in which many images of various format exist.

I tried the following but the output contains not only PNG but also other formats.

cmd /c dir /b "sub dir" *.png > output.txt

My question is what is the correct syntax to list all PNG images in sub dir?

Note that I invoked the code above via \immediate\write18{...} (TeX macro to invoke an external file).

Upvotes: 1

Views: 415

Answers (1)

Magoo
Magoo

Reputation: 80113

cmd /c dir /b "sub dir\*.png" > output.txt

should work for you.

Upvotes: 3

Related Questions