As always
1) What is your host OS
2) What is your guest OS? . I'm not sure about Windows 7 but Windows 8 can't run MS-DOS programs (except perhaps in some kind of weird compatiblity mode). Windows XP and earlier should be compatible with DOS command line. Also you could create a MS-DOS virtual machinie - it is supported. If you don' have the setup floppies for MS-DOS 6.22 then you can also trya FreeDOS CD. FreeDOS is 100% compatible with MS-DOS - well maybe 99.9% - don't really know. Obviously you may also have to fool around wit the VM settings or .vmx file and/or the setting withun the guest OS itself
Good luck