I've been playing with my string-enhanced uBasic today. I added a function to obtain the name of the last image taken, as well as one to delete a named file. I managed to get both to work - the CHDK 'remove' function does remove the file from the card. However the camera still thinks the images are there when you switch to play mode. The deleted images are not displayable - the camera reports "Unidentified Image" instead. If the card is removed and replaced everything is fine.
I presume that the 'image database' on the card is not updated when 'remove' is invoked, so it still has entries for the images that were deleted. Presumably when a card is inserted the camera checks the consistency of the database and removes bad entries.
Does anyone know how to invoke the 'consistency check' function programatically?