I am a little bit confused as to what you want.There is a command line example at dlang.org, and there exists a program(rdmd) that compiles several D files and runs them. http://dlang.org/rdmd.html
Sorry. I wasn't very clear. Say I want to find all of the files that have a certain extension within a directory and process them somehow at the command line. How could I do that?