--- title: "Rename" id: 77491 type: "computer_media" slug: "rename" url: "http://localhost/computer_media/rename/" markdown_url: "http://localhost/computer_media/rename.md" published_at: "2026-11-15T18:38:20+00:00" modified_at: "2026-11-15T18:38:20+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Renames a file on a Larken disk, in the directory and on every track header of the file." post_tag: - name: "LKDOS" slug: "lkdos" taxonomy: "post_tag" url: "http://localhost/tag/lkdos/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" genre: - name: "Utility" slug: "utility" taxonomy: "genre" url: "http://localhost/type/utility/" media_type: "Program" programmers: - name: "Bob Mitchell" slug: "bob-mitchell" taxonomy: "indiv" url: "http://localhost/indiv/bob-mitchell/" mediadate: "1986" article_media: - id: 38318 title: "Rename" type: "article" url: "http://localhost/article/rename/" media_type_tags: "Utility" license: false --- # Rename Renames a program on a Larken disk. It loads the directory (track 0), changes the name there, then follows the file’s track list and changes the name in the header of every track the file uses, saving each track back. Remove the write-protect sticker first. Written for the early Larken LDOS: it calls the disk routines directly (OUT 84, USR 63488, 63968, 61190 and 64915), so it needs the Larken disk system and there is no download. Lines 2, 4 and 500 are empty line numbers, as printed. Published in Sinc-Link August-September 1986 ([Rename](https://timexsinclair.com/article/rename/)). ## Source Code ``` 1 REM RENAME Bob Mitchell 2 3 REM Remove Protect Tabs While using Rename. 4 5 CLS : PRINT "Rename a disk program Insert disk" 7 PRINT "ready?": PAUSE 0 10 DIM x$(9): DIM y$(9): DIM z$(9): DIM a(79) 15 LET t=1 20 POKE 61000,251: POKE 61001,201 25 LET ei=61000: LET settrack=63968: LET loadtrack=61190 26 PRINT #1;"enter ""exit"" when directory"'"appears." 27 OUT 84,64: RANDOMIZE USR 63488: REM dire 30 INPUT "change name from "; LINE y$ 40 FOR i=61600 TO 63440 45 IF PEEK i=255 THEN LET k=i+1: FOR j=1 TO 9: LET x$(j)=CHR$ PEEK (i+j): NEXT j: IF x$=y$ THEN INPUT "change name to "; LINE z$: GO TO 100 50 NEXT i 100 FOR i=1 TO 9: POKE k,CODE z$(i): LET k=k+1: NEXT i 110 OUT 84,72: PAUSE 40: RANDOMIZE USR 64915 150 IF PEEK k<>253 THEN LET k=k+1: GO TO 150 155 GO TO 170 160 IF PEEK (k+1)=249 OR t>79 THEN GO TO 200 170 LET k=k+1: IF PEEK k>128 AND PEEK k<208 THEN LET a(t)=PEEK k: LET a(t)=a(t)-128 180 LET t=t+1: GO TO 160 200 LET t=1 205 POKE 61441,a(t) 210 RANDOMIZE USR settrack: RANDOMIZE USR loadtrack: RANDOMIZE USR ei 220 FOR l=1 TO 9: POKE 61505+l,CODE z$(l): NEXT l 225 OUT 84,72: PAUSE 40: RANDOMIZE USR 64915 230 LET t=t+1: IF a(t)<>0 THEN GO TO 205 500 510 CLS : PRINT PAPER 2; INK 7;"Program has been renamed "'"from ";y$;" to ";z$ 520 STOP 600 CLEAR 61000: OUT 84,64: RANDOMIZE USR 63488: REM save "rename.B1" 603 CLS : GO TO 1 ```