Jump to content

Having trouble with SD Rename File


Recommended Posts

I cannot get the SD Utility Rename File to work with an indirect Old File Name. If I enter the Old File Name directly it works. The New File Name is indirect in both cases. I even put an ASCII String on the HMI to check the Old File Name and it is being displayed correctly. I am using 6 MI's to hold the 12 characters of the 8.3 format file name. The status message is 16 which is bit 5, "Path not found".

Does anyone have any tips on solving this?

Link to comment
Share on other sites

Hi

I had one time also to try this Utilities, sometime work it and sometime not. Maybe work with uppercase.

Other Utilities with SD Card work with lowercase unreliable, with uppercase is better. not logical but have made ​​good experience.

good luck

montania

Link to comment
Share on other sites

Hi,

Which file type are you using?

Usually this kind of issue can be caused if the file is still open for writing.

For example CSV file is in open state to make write to SD card fast. To release it before rename, create a new temporary file by name i.e TEMP.csv then rename the old file.

Link to comment
Share on other sites

Hi all,

Please take care to use null-terminated strings for file names.

With this precaution everything will work.

Some remarks about this (and others) topics:

-When you ask for help, please provide as much as possible information, preferred to attach simple project.

-Answers without looking into project code will be useless and just spend a time. Unless you know exactly what happen.

To whom it is interesting - fixed project attached. It is for VisiLogic 9.4.0.

SD_Card_Trend_Read_Write_Append_fixed.vlp

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for your help Alex, this was the problem and my application is now working. I never found any mention of null-terminated file names in the documentation. I just assumed that because the file name must be in 8.3 character format it would require 12 bytes or 6 MI's.

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...