Clark Posted July 31, 2020 Report Share Posted July 31, 2020 Hello, how to create a folder on the Unistream SD card? I need to dynamically create backup folders. I want to create one file per day. For example : / Archive / 2020/07/31 For today / Archive /2020/07/30 For yesterday Thank you in advance for your help Link to comment Share on other sites More sharing options...
Annatooli Posted August 25, 2020 Report Share Posted August 25, 2020 Hi, Actually there is no dedicated "make directory" functions in Unistream, there aren't even way to move file from one SD folder to other SD folder with ladder. Since Unistream works on Linux, you MAYBE can create folders, if you construct file name and add "/" as folder separators. You may try "Store DTI to File" with filenames like "2020/07/31/archive" you may also try "./2020/07/31/archive" as file name. But it may not work. From my own experience you can not include characters like "space" in file name. Anatoly Link to comment Share on other sites More sharing options...
Clark Posted August 25, 2020 Author Report Share Posted August 25, 2020 Hi, Thank you Anatoly for your response. I tryed the two solucions proposed, without succes. The Status of the function always stay at 1, function in progress. And the folder haven't been creat. I tryed severals solutions like with the "Append Buffer to File" function, the "Rename File" function, no succes... I tryed with the FTP functions to, same failure. Do you have other idees for this issue ? thanks in advance Clark Link to comment Share on other sites More sharing options...
Swervomotor Posted August 26, 2020 Report Share Posted August 26, 2020 You should be able to create a new file no problem, Do you need a new folder for each file? Or can you create a folder on the SD from a PC and store your files in that folder? Your method of backup you will need to change the SD file # limit from 32, but you might start getting issues with so many files on the SD card as time passes. We store them to the SD in a folder then use the FTP functions to send them to our local FTP server, then overwrite. SD cards go bad. Link to comment Share on other sites More sharing options...
Clark Posted August 27, 2020 Author Report Share Posted August 27, 2020 Thank you Swervomotor for your answer. I must create at least one folder per year and per month. What about the limit from 32 your talking about ? My technical support assures me that there is no limite for the number of folder and files in the sd card. I understand your method of using SD card as a buffer to retrieve data from another FTP server. But I don't have another server on my client's network. Why do you think my SD card will go bad ? Of course i can creat the totality of the folders at the instalation of the system, but in this case i should creat them to ansure at least 20 years... (about 240 folders) Couldn't i use scripts on the PLC to create my folders? Link to comment Share on other sites More sharing options...
Annatooli Posted August 28, 2020 Report Share Posted August 28, 2020 I think what @Swervomotor means is if you look "Solution Explorer" - "SD Management". Default file limit there is 32. It is not SD card limitation it is Unilogic, who offers you delete older files so your SD card wont become full. You are correct it wont work like that. I did managed to make my own tests and I got errors "-6: Write file error". I do understand why those sub folders may be useful. I have 3 tables what I store regularly on my SD card and with month I have there 200-300 CSV files plus sig files for each of them. Total size of files is just 3 MB so my 2GB card can save logs for next 50 years, but all those files are crammed in one folder ... Anatoly Link to comment Share on other sites More sharing options...
Clark Posted August 31, 2020 Author Report Share Posted August 31, 2020 Hi, Ok, I understand better. We are indeed on the same type of use. I will have around 20 files to back up per day. This is the reason why I absolutely want to create subfolders. I asked the R&D department of my supplier, but I don't really expect a real solution. If only we could access the operating system, we could directly write scripts ... I think I'll have to start by manually creating folders when installing the machine. Hoping that an update of Unilogic will allow us to automatically create folders on the SD card ... Clark Link to comment Share on other sites More sharing options...
Swervomotor Posted September 22, 2020 Report Share Posted September 22, 2020 I've had 2 SD cards go bad this year. I think if you really need that 20 years of data you would find a redundant way to back it up. A cheap NAS can easily be configured as FTP server and mounted remotely or locally. The 32 limit is the default in Unilogic, you need to change that or it will start auto-deleting older files. I'm not sure but I believe it also has difficulties with subfolders. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted September 22, 2020 MVP 2023 Report Share Posted September 22, 2020 8 hours ago, Swervomotor said: I've had 2 SD cards go bad this year That is curious Swervo. I know it seems quality on some SDs these days has dropped off a bit as capacity goes up, but wondering if perhaps Unistream is writing to it far too much? Perhaps constantly, but invisibly in the background for some reason? cheers, Aus Link to comment Share on other sites More sharing options...
Clark Posted September 23, 2020 Author Report Share Posted September 23, 2020 Hello, thank you for your answer. I have already thought of an external solution for the FTP server, but the machine I am building is a medical device. And so I have to qualify each set of the device for normative compliance. And a cheap NAS will be hard to qualify as compliant ... But indeed, as a precautionary measure I will ask to set up a backup system on the system which recovers the information. Still no solution for the creation of directories directly on the Unistream's FTP ? Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now