da linea di comando non so!
da software....
ci sono delle DLL che fanno cio' che dici!
cerca ad esempio CDONTS (se usi VB, ASP ecc...)