How to change disk label?

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
VLX
Atariator
Atariator
Posts: 22
Joined: Sat Jan 23, 2016 12:36 am
Contact:

How to change disk label?

Post by VLX »

Hi to all

When I want to set disk label, I need to create empty file with atrribute FA_VOLUME, for example:

Code: Select all

Fcreate( "D:\\GAMES" , FA_VOLUME );
I can change already exists label by creating new file with this attribute, but how to remove label from disk when I want to set it empty?

I can't delete file with that attribute - I get error message "path not found".
There's not possible to create file with empty name. I also can't change attributes of existing file, to delete it like a normal one.

How to do this?
tstrauss
Atarian
Atarian
Posts: 9
Joined: Sun Sep 24, 2023 9:04 am

Re: How to change disk label?

Post by tstrauss »

Hi,

The Atari Profibuch states something to this topic:

It depends on the GEMDOS version.

IF GEMDOS-version < 0.15
IF volume-label exists
Create file with same name with Fcreate(), Close with Fclose(). Delete file with FDelete().
ENDIF
ENDIF
Create volume-label with Fcreate(). Close with Fclose()

From: Atari Profibuch 10th edition page 230

Regards
Thomas
VLX
Atariator
Atariator
Posts: 22
Joined: Sat Jan 23, 2016 12:36 am
Contact:

Re: How to change disk label?

Post by VLX »

Hello

It doesn't work.

When I create new file with Fcreate( path , FA_VOLUME ), it cannot be deleted with Fdelete( path ) (error "no path found").

When new file is created with Fcreate( path , 0 ) (or FA_ARCHIVE, whatever), then it's just normal file you can see in disk directory. It can be deleted with Fdelete( path ). In sector with directory I see two files with same name - one regular file and one for disk label. Fdelete works only for regular one, but it don't change disk volume.

Regards...
User avatar
mfro
Atari God
Atari God
Posts: 1290
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: How to change disk label?

Post by mfro »

VLX wrote: Fri May 24, 2024 12:40 pm When I create new file with Fcreate( path , FA_VOLUME ), it cannot be deleted with Fdelete( path ) (error "no path found").
You are supposed to create a regular file with the same name, not another volume label (but only do this on TOS 1.0).
VLX
Atariator
Atariator
Posts: 22
Joined: Sat Jan 23, 2016 12:36 am
Contact:

Re: How to change disk label?

Post by VLX »

How about TOS between 1.04 and 2.06? When I create regular file and delete it, volume name don't change. I just delete regular file, not volume.
User avatar
mfro
Atari God
Atari God
Posts: 1290
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: How to change disk label?

Post by mfro »

VLX wrote: Fri May 24, 2024 4:34 pm How about TOS between 1.04 and 2.06? When I create regular file and delete it, volume name don't change. I just delete regular file, not volume.
On later versions, you just need to Fdelete() the volume name "file name".
Last edited by mfro on Fri May 24, 2024 5:44 pm, edited 1 time in total.
VLX
Atariator
Atariator
Posts: 22
Joined: Sat Jan 23, 2016 12:36 am
Contact:

Re: How to change disk label?

Post by VLX »

Ok, but this way I can change name of volume. How to set it empty? I want to remove label, when someone leave empty field in "enter volume label" requester.
User avatar
Count
Captain Atari
Captain Atari
Posts: 169
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

Re: How to change disk label?

Post by Count »

mfro wrote: Fri May 24, 2024 4:44 pm
VLX wrote: Fri May 24, 2024 4:34 pm How about TOS between 1.04 and 2.06? When I create regular file and delete it, volume name don't change. I just delete regular file, not volume.
On later versions, you just need to Fdelete() the volume name "file name".
No, this does not work with TOS 1.04 and later versions. I tried deleting the volume name using Mupfel's label (e.g. "label A: -") command on several TOS versions:

1.00 and 1.02 → volume name can be deleted
1.04, 2.06, EmuTOS 1.01 → volume name remains

I found this in the release notes for TOS 1.04 (page 40, last paragraph on Attribute Byte):
... you can't use Fattrib, Frename, Fopen, or Fdelete on labels or subdirectories.
Everything is explained in detail on page 48.

Rainbow TOS Release Notes:
https://archive.org/details/rearc_atari ... 1991-03-05
Post Reply

Return to “C / PASCAL etc.”