moraalg wrote: what code or function can i use to display the files in a directory in a console( but only the file names, none of the detailed stuff like is shown in DIR) Have you tried to, at a command prompt, type dir /? ? If you had, you should probably have seen a switch "/B". If not, you are using an older OS that won't support this, and have to FindFirstFile&co yourself. is it possible to transfer a variable in my C++ program to DOS To DOS?! Are you really sure you are using VC1.52c and really sure you want to "transfer" it to dos??? like if i told them to input the name of the file they want to open, but it needs to be compatable with up to 900 files in the folder(so i can't use switch() ) Um, you want a user to be able to type in from 1 to 900 (!) filenames that you are then to operate on (not that I see how this has anything to do with sending stuff to DOS)? If you really want the users to type this stuff in, one filename at a time, use cin. If you on the other hand can accept (the more reasonable) argv/argc way of handling this, just loop over argv and "do your thing".