自动编辑文本文件并保存。 [英] Edit a text file automatically and save it.

查看:75
本文介绍了自动编辑文本文件并保存。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我在这里是新手,我刚刚开始我的VBcarier.. :)


这是我的问题(可能我对你很简单,但我发现它有点困难)。


我有一个txt文件,我想在其中替换每一个: "用。 !!!


更换完毕后,我想更换每个.3。用.5表示!!!


实际上txt是一个时钟文件,这里有很多...我想自动完成这个任务而不是用记事本打开每个sigle文件并且手动更换它们。


感谢您的时间和您的耐心!!!!

Hello to everyone!

I''m a newbie here, I just started my VB "carier".. :)

Here is my question (might me simple to you but I ''ve found it a bit hard).

I have a txt file in which I want to replace every ":" with a "." !!!

After this replacement I want to replace every ".3" with a ".5" !!!

In fact the txt is a clock file and there are a lot of them here... I want to do this task automatically and not by opening every sigle file with notepad and replacing them manually.

THANK YOU FOR YOUR TIME AND YOUR PATIENCE!!!!

推荐答案

您好antonopn


将txt文件加载到textbox(text1.text)

然后你可以保存它。

代码:(VB 6)
Hi antonopn

load the txt file into textbox (text1.text)
then you can save it.
Code: ( VB 6 )
展开 | 选择 | Wrap | 行号


非常感谢您的帮助!!!!!


我只有一个问题。我得到运行时错误424.对象需要

假设我的文本文件是nik.txt并且在C:\目录中。

C:\\ \\ nnik.txt


为了完成它,我应该如何编写以下内容?

Thanks a lot for your help!!!!!

I''ve got only one problem. I get a runtime error 424. "Object required"
Lets suppose that my text file is nik.txt and is in C:\ directory.
C:\nik.txt

How should I write the following in order to get it done?

展开 | 选择 | Wrap | 行号



我有一个txt文件,我想在其中替换每个:用。 !!!


更换完毕后,我想更换每个.3。用.5表示!!!


实际上txt是一个时钟文件,这里有很多...我想自动完成这个任务而不是用记事本打开每个sigle文件并且手动更换它们。


感谢您的时间和您的耐心!!!!
I have a txt file in which I want to replace every ":" with a "." !!!

After this replacement I want to replace every ".3" with a ".5" !!!

In fact the txt is a clock file and there are a lot of them here... I want to do this task automatically and not by opening every sigle file with notepad and replacing them manually.

THANK YOU FOR YOUR TIME AND YOUR PATIENCE!!!!



好​​吧,首先你需要打开文件输入,抓取它的内容并关闭文件。

Well, first you''ll need to open the file for input, grab its contents and close the file.

展开 | 选择 | Wrap | 行号


这篇关于自动编辑文本文件并保存。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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