TT_ZX Posted May 24, 2012 Report Share 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? Quote Link to comment Share on other sites More sharing options...
montania Posted May 24, 2012 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Ofir Posted May 24, 2012 Report Share 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. Quote Link to comment Share on other sites More sharing options...
TT_ZX Posted May 24, 2012 Author Report Share 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. Quote Link to comment Share on other sites More sharing options...
TT_ZX Posted May 24, 2012 Author Report Share Posted May 24, 2012 Here is a program demonstrating the problem. SD_Card_Trend_Read_Write_Append.vlp Quote Link to comment Share on other sites More sharing options...
TT_ZX Posted May 25, 2012 Author Report Share Posted May 25, 2012 Tried both upper and lower case but no luck. Thanks for your input. Quote Link to comment Share on other sites More sharing options...
AlexUT Posted May 28, 2012 Report Share 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 Quote Link to comment Share on other sites More sharing options...
TT_ZX Posted June 11, 2012 Author Report Share 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.