<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Resize files</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/7e9e6c2f00/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/7e9e6c2f00/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/7e9e6c2f00/</id><updated>2020-02-27T19:57:13.784000Z</updated><subtitle>Recent posts to Resize files</subtitle><entry><title>Resize files</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/7e9e6c2f00/?limit=25#723c" rel="alternate"/><published>2020-02-27T19:57:13.784000Z</published><updated>2020-02-27T19:57:13.784000Z</updated><author><name>merlijn</name><uri>https://forge.codesys.com/u/merlijn/</uri></author><id>https://forge.codesys.com0058760c074b8cee8edad5e4ced261b9cef153e4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hello Shooter&lt;/p&gt;
&lt;p&gt;I solved the problem&lt;/p&gt;
&lt;p&gt;first i scan the directory and save from all file's in that directory the name, creation date and the size in a array&lt;br/&gt;
and find out witch file is the newest and witch file is the oldest and how big the directory is&lt;br/&gt;
then i check or the newest file is bigger then the maximum size set&lt;br/&gt;
if that is the case i create a new file with a name based on the system time Example ( 2013-08-08-09-47-25.log )&lt;br/&gt;
after that i check or the directory has reached the maximum size set ithat is the case&lt;br/&gt;
I will delete the oldest files&lt;/p&gt;
&lt;p&gt;to do this i use the library's syslibfile.lib and the library syslibdir.lib&lt;/p&gt;
&lt;p&gt;but thanks for your support&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Resize files</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/7e9e6c2f00/?limit=25#6285" rel="alternate"/><published>2020-02-27T19:57:10.202000Z</published><updated>2020-02-27T19:57:10.202000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comd501d5eb010d925a2547a2127f1e2e39f5b17f67</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;two ways to do this.&lt;br/&gt;
make a file and when reaching max size start another file, when this reaches the end start filling file 1 again.&lt;/p&gt;
&lt;p&gt;another way is by removing last line while copying and adding first line.&lt;br/&gt;
this means always diskactivity.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Resize files</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/7e9e6c2f00/?limit=25#ab09" rel="alternate"/><published>2020-02-27T19:57:08.913000Z</published><updated>2020-02-27T19:57:08.913000Z</updated><author><name>merlijn</name><uri>https://forge.codesys.com/u/merlijn/</uri></author><id>https://forge.codesys.com0d689eb4323ab8ce0ee4c2fa997b2c12784b3b7b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;At this moment i'm logging alarms in a file on the plc&lt;/p&gt;
&lt;p&gt;but I want to limit the maximum file size&lt;br/&gt;
to avoid the problem that the plc runs out of disk space&lt;br/&gt;
So when the file reaches the maximum file size and I want to apend a new text line to the file I want also&lt;br/&gt;
remove the oldest (first text line in the file ), first in first out principle&lt;br/&gt;
Is this posible ??&lt;/p&gt;
&lt;p&gt;And can sombody give me a hint &lt;/p&gt;
&lt;p&gt;kind regards&lt;/p&gt;
&lt;p&gt;Merlijn&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>