--- title: "Disk_rename2" id: 77611 type: "computer_media" slug: "disk_rename2" url: "http://localhost/computer_media/disk_rename2/" markdown_url: "http://localhost/computer_media/disk_rename2.md" published_at: "2026-11-18T12:06:35+00:00" modified_at: "2026-11-22T09:55:56+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Renames a QL disk in drive 1 or 2, in DD, HD or ED format." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "QL" slug: "ql" taxonomy: "post_tag" url: "http://localhost/tag/ql/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Howard Clase" slug: "howard-clase" taxonomy: "indiv" url: "http://localhost/indiv/howard-clase/" genre: - name: "Disk Drive Systems" slug: "disk-drive-systems" taxonomy: "genre" url: "http://localhost/type/disk-drive-systems/" media_type: "Diskette" programmers: - name: "Howard Clase" slug: "howard-clase" taxonomy: "indiv" url: "http://localhost/indiv/howard-clase/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Disk_rename2%20%281993%29%28Clase%2C%20Howard%29%28Sinclair%20QL%29%28CA%29%28Program%29.zip" mediadate: "1993" article_media: - id: 23795 title: "Howard Clase plays with Disks" type: "article" url: "http://localhost/article/howard-clase-plays-with-disks/" related_content: - id: 77388 title: "Disk_RE_Name" type: "computer_media" url: "http://localhost/computer_media/disk_re_name/" - id: 77610 title: "Disk_rename" type: "computer_media" url: "http://localhost/computer_media/disk_rename/" media_type_tags: "Disk Drive Systems" license: false --- # Disk_rename2 The extended version of Disk_rename: it asks for the drive (1 or 2) and the format (DD, HD or ED), shows the disk’s old name and writes the new one into the first sector. It needs Toolkit II. Line 235 writes to channel #3 while the disk was opened with FOPEN as ch%. That works when FOPEN gives channel 3, the first free one when no other channels are open. Published in Sinc-Link November-December 1993 ([Howard Clase plays with Disks](https://timexsinclair.com/article/howard-clase-plays-with-disks/)). ## Source Code ``` 5 nm$= "Disk_rename2" 10 REMark h.j.c. 1993.8.18 version 2.0 15 REMark N.B. Requires TK II 20 Set_up: Rename_disk: Finish: STOP 100 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 105 DEFine PROCedure Set_up 110 CLS: FLP_SEC 2 115 pd$="1,2": REMark Numbers of drives available 120 pf$="D,H,E": REMark possible formats 125 dev$=Get_flp$: fmt$=Get_fmt$ 130 END DEFine 200 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 205 DEFine PROCedure Rename_disk 210 LOCal a$,n$: a$="": n$="" 215 ch%=FOPEN(dev$&fmt$) 220 GET#ch%\1,a$ 225 PRINT\\"Old name = ";a$(5 TO 14) 230 INPUT "New name (ENTER to keep old) = "!n$ 235 IF n$<>"": a$(5 TO 14) = n$: PUT#3\1,a$ 240 END DEFine 300 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 305 DEFine PROCedure Finish 310 CLOSE#ch% 315 END DEFine 400 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 405 DEFine FuNction Get_flp$ 410 LOCal d$,n$,lp,p$: d$="flp1_": p$="("&pd$&")" 415 REPeat lp 420 PRINT"Which drive is the disk in? ";p$, 425 n$=INKEY$(-1): PRINT "flp";n$ 430 IF n$ INSTR(pd$) AND n$<>",": Pip: EXIT lp 435 PRINT "Drive ";n$;" not available." 440 BEEP 4000,30: END REPeat lp 445 d$(4)=n$: RETurn d$: END DEFine 500 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 505 DEFine FuNction Get_fmt$ 510 LOCal f,f$,p$,r$: p$="("&pf$&")" 515 REPeat lp 520 PRINT"Disk format? ";p$,,, 525 f$=INKEY$(-1):PRINT f$&"d" 530 IF f$ INSTR(pf$) AND f$<>",": Pip: EXIT lp 535 PRINT "Format ";f$;"d unknown." 540 BEEP 4000,30: END REPeat lp 545 f = CODE(f$): SELect ON f 550 = 68,100: r$="*D2D" 555 = 69,101: r$="*D4E" 560 = 72,104: r$="*D2H" 565 END SELect : RETurn r$: END DEFine 600 REMark ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 605 DEFine PROCedure Pip: BEEP 100,30:END DEFine ```