Yes, you can do it with the system command in Qbasic. Or C. But you'd likely be as well off with a batch program running in or from autoexec.bat. That said, you will have to arrange a response file if you want the format commands to run unattended. Be very cautious, lest you format something you do not intend, those confirmations built into the os's format command are there for a reason. Good luck.