' *** DSK_NAME.LST *** 2nd GFA-Manual, page 11-21 > PROCEDURE disk_newname(drive$,name$) ' ' *** Change name of disk in drive$ ("A" or "B") to name$ ' *** The original disk-name is deleted after changing the file-attribute to 0 ' LOCAL adr%,drive%,buffer%,label$ LET name$=UPPER$(name$) ! upper case adr%=FGETDTA() drive%=SUB(ASC(UPPER$(drive$)),64) ! A=1 B=2 CHDRIVE drive% ! change drive CHDIR "\" ! root-directory INLINE buffer%,44 ~FSETDTA(buffer%) ! temporary DTA-buffer ~FSFIRST("*.*",8) ! find disk-name label$=CHAR{buffer%+30} ! disk-name ~GEMDOS(60,L:VARPTR(label$),0) ! open with attribute 0 ~GEMDOS(62,L:VARPTR(label$)) ! close it ~GEMDOS(65,L:VARPTR(label$)) ! delete it ~GEMDOS(60,L:VARPTR(name$),8) ! open with new disk-name ~GEMDOS(62,L:VARPTR(name$)) ! close it ~FSETDTA(adr%) ! restore original DTA-buffer RETURN ' ********* '