Hi All
Can i read Dos command out values in file or Buffer?
For example if i run dir command in dos then it show file and directory name.Now i want to store these file and directory in file or Buffer.
is it possible then guide me..
Printable View
Hi All
Can i read Dos command out values in file or Buffer?
For example if i run dir command in dos then it show file and directory name.Now i want to store these file and directory in file or Buffer.
is it possible then guide me..
1. I gave some links that could help in your previous thread about running .bat (.cmd) files.
2. To get the result of "dir command" you don't need starting ms dos dir. There are Windows APIs (FindFirstFile/FindNextFile/FindClose) and their MFC wrapper (CFileFind class) that you should use.
Thanks for reply
Yes your link help me to solve last problem.
sir dir command just a example, command may be Copy con,Makedir etc
Sir is it possible to read values from command prompt?
Please guide me
MS Dos copy and mkdir have corresponding Win32 "analogs": CopyFile and CreateDirectory. :cool:
What will you read by dos command copy or delete ?
No, Msm posted Can i read Dos command out values in file or Buffer?
So what will he store in file or buffer by copy or delete command ?.
Oh yes I didn't check that he asked for values to be read from console. I though he asked for output screen to be saved in file stream.
You can of course redirect the output of any console command to a file which can then be read. However, I'm unclear as to why one would do such a thing. Perhaps if you clarified your high-level objective rather than focusing on your present strategy?