TT_ZX Posted May 24, 2012 Report Posted May 24, 2012 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?
montania Posted May 24, 2012 Report Posted May 24, 2012 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
Ofir Posted May 24, 2012 Report Posted May 24, 2012 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.
TT_ZX Posted May 24, 2012 Author Report Posted May 24, 2012 This is for a trend file. I'm trying to rename it from TREND100.UTR to TREND101.UTR. I stop the Trend To SD utility before trying to rename the file.
TT_ZX Posted May 24, 2012 Author Report Posted May 24, 2012 Here is a program demonstrating the problem. SD_Card_Trend_Read_Write_Append.vlp
TT_ZX Posted May 25, 2012 Author Report Posted May 25, 2012 Tried both upper and lower case but no luck. Thanks for your input.
AlexUT Posted May 28, 2012 Report Posted May 28, 2012 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
TT_ZX Posted June 11, 2012 Author Report Posted June 11, 2012 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.
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