aboutsummaryrefslogtreecommitdiff
path: root/ksiders/sortatr.1
blob: 98301b3280c657c13d8ec7b11a01c0bcda24f9d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.TH SORTATR "1" "April 2007" "sortatr" "Ken Siders' Atari 8-bit Tools"
.SH NAME
\fBsortatr\fR \- sort Atari DOS directory in an ATR image

.SH SYNOPSIS
\fBsortatr\fR \fIimagefile.atr\fR

.SH DESCRIPTION
\fBsortatr\fR sorts the directory entries in an Atari DOS 2.0S or MyDOS
compatible ATR images. The sort is alphabetical, and the disk image
is modified in place.
.PP
\fBatrextr\fR does not take any options.
.SH WARNINGS
\fBDO NOT USE\fR this utility with DOS 2.5 disk images!
.PP
\fBDO NOT USE\fR this utility with MyDOS images containing subdirectories!
.PP
\fBDATA LOSS\fR will occur if these warnings are not heeded! The modified
directory in the image will not contain any references to DOS 2.5 files
using sectors above 720, or to MyDOS subdirectories. This effectively
\fBdeletes\fR these files from the image.
.PP
If in doubt, list the image's directory with \fBatrdir\fR. If you see
files marked with a \fI:\fR (colon) or \fI<\fR (less-than), then
\fBsortatr\fR should not be used on the image. Even if your purpose
is actually to delete these files/dirs, you should use some other
utility (or DOS on a real or emulated Atari) to delete them, because
\fBsortatr\fR doesn't free the sectors occupied by the files/dirs.
.PP
If you ignore these warnings and manage to delete files or directories
from your disk image, it should be possible to recover them with a good
Atari undelete or disk\-repair utility. Although the affected files/dirs
have been removed from the disk directory, the data sectors have not
been overwritten nor marked as free (meaning they won't be overwritten
by later write operations, unlike most "undelete" situations).
First, you have to
find the starting sector of the missing file/dir and
create a directory entry for it in the directory at sectors 36-368. You
will probably also have to change the file number in the sector link
bytes, or else delete the file in the new directory that's using the
file number of the old (deleted) file.
.PP
Further warnings:
.PP
\fBDO NOT USE\fR this utility with any non-standard (non\-AtariDOS,
non-MyDOS compatible) disk image.
.PP
Boot disks with no directory,
SpartaDOS, Atari DOS 3/4, DOS XE, or other non\-standard DOS formatted
disks might (if you're lucky) just cause an error message. If
you're not lucky, they may be corrupted. There is no easy way to
recover an image that gets damaged in this way.
.PP
\fBDO NOT USE\fR this utility with \fIany\fR image without creating a
backup first!
.PP
Any image you use with \fBsortatr\fR is modified in-place,
and no backup is made by \fBsortatr\fR. \fBAlways\fR make a backup
copy of an ATR image before you use \fBsortatr\fR on it. \fIYou have
been warned\fI.
.SH NOTES
XFD format images are not supported.
.PP
Exit status is zero if the sort was successful, or
non-zero if any errors occurred. In case of a non-zero return,
the disk image may be truncated, or its directory sectors may be
damaged. Hope you had a backup of that image!
.SH AUTHOR
Ken Siders <\fBatari8bit@columbus.rr.com\fR>
.PP
Man page by B. Watson <\fBurchlay@urchlay.com\fR>

.SH SEE ALSO
\&\fIatrdir\fR\|(1), \&\fIatrextr\fR\|(1), \&\fImakeatr\fR\|(1),
\&\fIunmakatr\fR\|(1).
.PP
Ken Siders Atari 8-bit page:
.br
http://atari.ksiders.tzo.com/a8emulators.html