Hello All,
Is it possible to load and unload a .Log or a .txt?
Hello All,
Is it possible to load and unload a .Log or a .txt?
“Load” and “Unload” are for modules, but “ReadStr” can read and “Write” can write text file data.
I am able to read and write to the .log or .txt, but I want to be able to save it to a connected network automatically once a week.
I am having to do it manually.
thank you.
Look at the help on the CopyFile instruction, it will take a file from one directory and copy it to another. You probably want to time and date stamp it or something.
For regular triggering maybe you could occasionally check the time and date (CTime and CDate functions) and compare that to the last time you moved the file.
Below is some code which might help.
sTime:=StrPart(CTime(),1,2)+StrPart(CTime(),4,2);
sLogFileName:=“LogFile_Saved_”+CDate()+“_”+sTime+“.txt”;
!
CopyFile “HOME/LogFile.txt”,“E:/”+sLogFileName;