The C64 - Disc operations / BASIC - How to delete files? (2024)

  • Quick links
    • Members
    • The team
  • FAQ
  • Login
  • Register
  • ForumCommodore 64Emulators

Moderator: Lemoners

Post Reply

  • Print view

12 posts• Page 1 of 1

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

The C64 - Disc operations / BASIC - How to delete files?

  • Quote

Postby Atombender »

Hi all,

I'm really having a blast programming BASIC on my "new" C64. The C64 - Disc operations / BASIC - How to delete files? (2)
I've already stored many programs on the internal TheC64 disk and my son also has written many iterations of groundbreaking software (e.g. a ballon flies from left to right) and saved it to that disk.

Long story short...
How do I "delete/scratch" a program from a disk in this emulation environment?

I've tried this already:

Code: Select all

OPEN 15,8,15,"S0:<filename>":CLOSE 1

But it is not working. My guess is, that I'm doing something wron with the device numbers S0 and so on.

I'm done with my experimenting and can't really figure it out.
I'm old... so i don't have much time left haha.
Has anyone of you tried this already?

Thanks very much in advance
Atom

Top

BigFairy321
Zorro
The C64 - Disc operations / BASIC - How to delete files? (4)
Posts: 1101
Joined: Tue Apr 06, 2004 12:07 am
Location: Brisbane Australia
Age: 48

  • Quote

Postby BigFairy321 »

Haven't tried what your trying, but have you tried using a file copier like fast hack'em ?

" Off with the Fairy's "

Top

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

  • Quote

Postby Atombender »

BigFairy321 wrote:Haven't tried what your trying, but have you tried using a file copier like fast hack'em ?

Ooh... that sounds interesting.
I'll try that soon!

I was born in 1976.
I prefer a C64 over most Windows 10 machines The C64 - Disc operations / BASIC - How to delete files? (6)

Top

RetroLynx
William Wobbler
The C64 - Disc operations / BASIC - How to delete files? (8)
Posts: 121
Joined: Sun Mar 15, 2015 3:37 pm
Location: Germany
Age: 52

  • Quote

Postby RetroLynx »

try this please:

OPEN1,8,15,"S:FILENAME"
CLOSE1

(p.s. if it wasn't a typo in your post: there's a 1 at the end of your line, it should be 15. it's the first number you need to close, so the command gets finished.)

Top

Andromeda1968
Joe Blade
The C64 - Disc operations / BASIC - How to delete files? (9)
Posts: 213
Joined: Tue Oct 15, 2002 11:11 am

  • Quote

Postby Andromeda1968 »

the scratch command works fine with the THEC64....format too

Top

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

  • Quote

Postby Atombender »

RetroLynx wrote:try this please:

OPEN1,8,15,"S:FILENAME"
CLOSE1

(p.s. if it wasn't a typo in your post: there's a 1 at the end of your line, it should be 15. it's the first number you need to close, so the command gets finished.)

Yes!
This works - BUT you have to restart the Emulator to see the change on the disc.

I was born in 1976.
I prefer a C64 over most Windows 10 machines The C64 - Disc operations / BASIC - How to delete files? (11)

Top

MeneerJansen
Rick Dangerous
The C64 - Disc operations / BASIC - How to delete files? (13)
Posts: 1531
Joined: Mon Jan 13, 2020 1:22 pm
Location: Holland, Europe. Favorite games: Exploding fist, Bruce Lee, Phoenix.
Age: 54

  • Quote

Postby MeneerJansen »

I think you do not have to reboot the C64 but that you have to re-load the directory like so:

Code: Select all

LOAD "$",8

And then list the directory with:

Code: Select all

LIST

If you delete something from the disk then it is gone. However, the old directory list of that floppy disk is still in the 64 kB of internal memory of the C64. You'll have to force the C64 to re-read the contents of the floppy. For people like me that got used to computers when they had a hard disk, from which you can read directly, this takes some getting used to. Gotta love the way the C64 works. Fascinating. The C64 - Disc operations / BASIC - How to delete files? (14)

Top

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

  • Quote

Postby Atombender »

Yeah, gotta love that wonky machine...
I'll verify this - got loads to delete hehe.

I was born in 1976.
I prefer a C64 over most Windows 10 machines The C64 - Disc operations / BASIC - How to delete files? (16)

Top

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

  • Quote

Postby Atombender »

Atombender wrote:

RetroLynx wrote:try this please:

OPEN1,8,15,"S:FILENAME"
CLOSE1

(p.s. if it wasn't a typo in your post: there's a 1 at the end of your line, it should be 15. it's the first number you need to close, so the command gets finished.)

Yes!
This works - BUT you have to restart the Emulator to see the change on the disc.

Ok, here is what works for me (The C64, classic mode, PAL 50, Firmware 1.3.2)

Load the contents of disc:

Code: Select all

LOAD "$",8

Show files:

Code: Select all

LIST

Delete desired file:

Code: Select all

OPEN 15,8,15,"S:PROGRAMNAME":CLOSE15

Load contents again with

Code: Select all

LOAD "$",8

Check with

Code: Select all

LIST

Done The C64 - Disc operations / BASIC - How to delete files? (18)

Thanks for your contributions (still not sure why I need the 15 or will 1 do as well?)
Atom

I was born in 1976.
I prefer a C64 over most Windows 10 machines The C64 - Disc operations / BASIC - How to delete files? (19)

Top

MeneerJansen
Rick Dangerous
The C64 - Disc operations / BASIC - How to delete files? (21)
Posts: 1531
Joined: Mon Jan 13, 2020 1:22 pm
Location: Holland, Europe. Favorite games: Exploding fist, Bruce Lee, Phoenix.
Age: 54

  • Quote

Postby MeneerJansen »

Atombender wrote:[...] (still not sure why I need the 15 or will 1 do as well?)

Many people use "15". But AFAIK the first "15" is the descriptor of the channel that you opened. That descriptor might as well be "1", many people do.

BTW: if you want to edit the contents of a disk you can also download and attach an image file of the 'Final Cartrigde III' (link). See what I wrote about that in this topic:

It's disk utility however is where it still shines today. I use it to rename files, re-sort the dir list etc. It's quirky because it sometimes appears to not have saved my changes though...

Top

TomXP411
Rick Dangerous
The C64 - Disc operations / BASIC - How to delete files? (23)
Posts: 2492
Joined: Mon Apr 23, 2018 11:17 pm
Location: The Altair Sector
Age: 52

  • Quote

Postby TomXP411 »

I'm going to strongly suggest getting a ROM with a DOS wedge, either JiffyDOS or Epyx FastLoad.

You should be able to fire up the TheC64 with an Epyx FastLoad CRT installed like any other game - but EFL should drop you to the BASIC prompt, rather than a game title.

Then loading programs is as simple as typing

/filename

and you can issue disk commands with the @, so:

@s0:filename

and $ gets a directory

I never use my Commodores without a Fast loader, just for the convenience if not the speed.

Ultimate 64 · C128 · 64C · Turbo Chameleon
Keyrah · Ultimate II+ · SD2IEC · 1541 · 1541-II · 1571
RIP my '84 C= 64

Top

Atombender
Bionic Granny
Posts: 10
Joined: Wed Jan 08, 2020 6:50 pm

  • Quote

Postby Atombender »

TomXP411 wrote:I'm going to strongly suggest getting a ROM with a DOS wedge, either JiffyDOS or Epyx FastLoad.

Y...

I never use my Commodores without a Fast loader, just for the convenience if not the speed.

I've actually owned that cartridge but I forgot - I'll download it soon.
Thanks for the memory leak fix The C64 - Disc operations / BASIC - How to delete files? (25)

I was born in 1976.
I prefer a C64 over most Windows 10 machines The C64 - Disc operations / BASIC - How to delete files? (26)

Top

Post Reply

  • Print view

12 posts• Page 1 of 1

Return to “Emulators”

Jump to

  • Commodore 64
  • ↳ General
  • ↳ Games
  • ↳ Games Competitions
  • ↳ Emulators
  • ↳ Scene
  • ↳ New Releases
  • ↳ Supermarket
  • ↳ Protovision
  • ↳ RGCD/Psytronik
  • Lemon64
  • ↳ Website Discussions
  • ↳ Member Introductions
  • Off-Topic
  • ↳ Other 8-bit Commodore computers
  • ↳ Chit Chat

Who is online

Users browsing this forum: No registered users and 1 guest

  • Forum
  • All times are UTC
  • Delete cookies
  • Members
  • The team

Powered by phpBB® Forum Software © phpBB Limited

Privacy|Terms

The C64 - Disc operations / BASIC - How to delete files? (2024)

References

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6457

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.