Jump to content

How to create folders in SD Card


Clark

Recommended Posts

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

  • 4 weeks later...

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

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

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

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

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

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

  • 4 weeks later...

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

  • MVP 2023
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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...