获取dos提示命令的输出字符串 [英] Get output string of dos prompt command

查看:131
本文介绍了获取dos提示命令的输出字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我通过dos提示符中的shellexecute函数执行dos命令"c:\ dir",我想将输出字符串转换为字符串变量.任何机构都可以提出这个问题的最短解决方案....



在此先感谢
Vivek Chauhan

hi all,
I execute the dos command ''c:\dir '' through shellexecute function in dos prompt and I want to get output string to a string variable. can any body suggest the shortest solution of this problem....



Thanks in advance
Vivek Chauhan

推荐答案

以下是一篇不错的文章:
重定向任意控制台的输入/输出 [
Here a nice article about that:
Redirecting an arbitrary Console''s Input/Output[^]

Good luck!


这篇关于获取dos提示命令的输出字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆