通过shell命令在记事本中写 [英] writing in notepad through through shell command

查看:95
本文介绍了通过shell命令在记事本中写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨;


我使用以下代码在shell命令的记事本中编写系统IP

shell(" ipconfig> c :\ ipfile.txt")


但它什么都不做(也没有错误)


请解决这个问题


Thanx

Ravi

Hi;

I m using following code for writing system IP in notepad from shell command

shell("ipconfig > c:\ipfile.txt")

but it do nothing( no errors comes also)

please solve this problem

Thanx
Ravi

推荐答案

您好,Ravi。

我不确定是否可以使用命令行参数将stdout定向到文本文件,但您可以轻松地通过Access(您的意思是?)应用程序获取它。阅读以下内容 - 等待外壳完成


问候,

鱼。
Hello, Ravi.

I''m not sure whether stdout could be directed to text file using command line parameter, but you can easily get it by Access (did you mean this ?) application. Read the following - Waiting for Shell to Finish.

Regards,
Fish.


在批处理文件中可以很容易地实现非常类似的东西,如果你愿意,甚至可以在Access中打开:
Something very similar can easily be implemented within a Batch File, and even opened within Access if you so desire:
展开 | 选择 | Wrap | 行号


首先,只有在调用函数时,使用括号括起Shell()参数才是正确的:
Firstly, using parentheses to surround the Shell() parameters is only correct if you Call the function :
展开 | 选择 | 换行 | 行号


这篇关于通过shell命令在记事本中写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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