Posted: Fri Feb 22, 2019 3:40 am Post subject: AVR DOS KILL
I am having trouble with the KILL command. I am logging data to an SD card., and from time to time ( and I dont know how) I end up with a file that is zero bytes long.
eg xxxxxxxx.TXT I detect these files and try to kill them thus:
( as the code is very long, only the relevant bits are shown)
Code:
'******************************************************************************* $regfile="m1284pdef.dat"'my processor $crystal=9830400'system crystal $framesize=800' Located at top of 16k of SRAM $hwstack=550' $swstack=550' $frameprotect=1 stopwatchdog
If Msg_id =0Then Print #1 , ">> deleting "; Myfilename
Chdir"\" Chdir Cachefoldernamestr
Kill Myfilename 'delete from sd card
End If
The code works fine, and has been for several years, except when a zero file arrives, then the code hangs, immediately at "kill myfilename"
I have got round the issue but my question is - does kill not work with a zero length file? _________________ Neil
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum