Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 4:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: writing a single line to a text file without appending.
PostPosted: February 3rd, 2008, 1:06 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
A simple problem :-) has anyone a method of writing a single line of text to a text file without appending to the last one written. I have an application where I am writing some data to a text file. It is updated every 15 seconds and I simply want to update the text file with the new value?

I think I have tried every way, but might have missed the obvious.

The way I am using just now is to create an INI file, but call it a .txt. This works fine, but I would prefer not to have the section name and the = sign. I can blank the entry, but the square brackets remain and the = sign.

There must be a way of doing this with a simple text file without having to delete the file and rewriting???? I can insert at start and end, but not overwrite?? I tried \b for backspace, but it doesn't seem to work in Opus.
I have to use a text file. Registry is not an option or database :-) The file is then picked up by another application.
Sandy

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: February 4th, 2008, 10:55 am 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I think I have found an action which will do it!! :-)


in actions....'write text to file and overwrite'.



I knew there would be a way somewhere.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 51 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group