标题: [文件操作] [已解决]批处理怎样替换文本内容? [打印本页]
作者: bingxing8000 时间: 2011-8-18 22:49 标题: [已解决]批处理怎样替换文本内容?
1.txt的内容如下
192.168.1.1
192.168.1.2
192.168.1.3
1.vbs的内容如下:- Set objEmail = CreateObject("CDO.Message")
-
- objEmail.From = "*" '发件人
- objEmail.To = "*" '收件人
- objEmail.Subject = "*" '主题
- objEmail.Textbody = "*" '内容
-
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
- "smtp.adpanshi.com"
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "*" '用户名
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*" '密码
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 '明文验证
- objEmail.Configuration.Fields.Item _
- ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
- objEmail.Configuration.Fields.Update
- objEmail.Send
复制代码
如何用1.txt里的所有内容 替换1.vbs里 objEmail.Textbody = "*" '内容 *号的内容?
作者: ArdentMan 时间: 2011-8-19 10:49
- objEmail.Textbody = CreateObject("Scripting.FileSystemObject").OpenTextFile("1.txt").ReadAll() '内容
复制代码
作者: bingxing8000 时间: 2011-8-19 11:26
回复 2# ArdentMan
可以使用的,谢谢。
vbs很强大啊
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |