Unable to overwrite file on .d64 disk?

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Unable to overwrite file on .d64 disk?

Unread post by Newsdee »

I've been using the core to play around with Commodore BASiC. It works okay, but I notice that if I do a SAVE on an existing file on disk, then it does not seem to modify the file contents.

It works fine if I create a new file, though. I can restart the core and reload the .d64 and my program is still there.

Am I doing something wrong? Or is it an issue in the core?
My main concern is that it fails silently, I accidentally lost some changes.
lupin3rd
Posts: 35
Joined: Wed Jun 17, 2020 7:15 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Unable to overwrite file on .d64 disk?

Unread post by lupin3rd »

Yes, you're doing something wrong. On the C-64, you can't just overwrite a file by using the SAVE command again. See this page for more details. To overwrite, you can use this command (but it comes with caveats, so do your own research into the matter):

SAVE "@0:FILENAME",8

Hope that helps!
Post Reply