Files
hpr-knowledge-base/hpr_transcripts/hpr3550.txt
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

178 lines
15 KiB
Plaintext

Episode: 3550
Title: HPR3550: Format; Copy; Diskcopy; Xcopy
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3550/hpr3550.mp3
Transcribed: 2025-10-25 01:17:21
---
This is Hacker Public Radio Episode 3554 Friday, 11 March 2022.
Tid's show is entitled, Format, Copy, Discopy, Scope and is part of the series DOS it is hosted by Aukka
and is about 20 minutes long and carries a clean flag.
The summary is, we continue our look at the Old Warhorse,
DOS this time it is Format and Copy Commands.
This episode of HPR is brought to you by archive.org.
Support universal access to all knowledge by heading over to archive.org forward slash donate.
Hello, this is Aukka welcoming you to Hacker Public Radio in another exciting episode
in our series on DOS, the Old Warhorse operating system from way way back in the day.
And what we're going to do today we're going to look at some related issues around Format,
Copy, Discopy and X Copy. There are four important commands and you kind of need to master them
if you're going to be proficient at DOS. The starting point has to be commands that are probably
used most which is to prepare a disk and copy files. Please note that in this discussion we will
not cover every possible use of these commands or every possible switch or argument pertaining to
them. For a complete look at these commands you should look them up in the DOS
help system but this is a good overview for you. Now Format. Formatting a disk prepares it to
receive data. An unformatted disk cannot be used until it has been formatted. Part of this
formatting process is installing the file system. And guess what, after this we're going to look at
file systems. But anyway, for DOS disks the file system for a floppy disk is fat 12.
Now, disks come in various sizes and densities. The original IBM PC used five and a quarter inch floppy
disks that were really floppy. You could bend them. No, they probably would not work afterwards.
Prior to that, if you really go back you'll find they had eight inch disks.
Now the first DOS disks with the five and a quarter inch could be formatted to hold 160 K.
That's 160 kilobytes of data on one side of the disk. Then the scientists got really busy and
figured out how to create something called double density. So you could write to both sides of the
disk. And that allowed them to bump it up to about 360 K. And the final refinement of the five
and a quarter inch disk, which was called high density, pushed this all the way to a whopping 1.2
megabytes. Now this was the final appearance of the five and a quarter inch disk.
No, since a smaller type of floppy had appeared. And that was the three and a half inch disk that
quickly took over. Now three and a half inch disks are encased in a hard plastic shell,
which occasionally confuses people who wonder about the floppy part of the name.
But inside this plastic shell there is a thin and very floppy mylar disk.
The equivalent double density and high density values for this are 720 K and 1.44 megabytes
respectively for these disks. Now if you want more detail on floppy disk sizes and structures,
I've put a link to a Wikipedia article in the show notes.
By the way, for trivia buffs, Toshiba introduced a 2.88 megabyte floppy drive,
doubling the capacity in the late 1980s, but it never caught on.
And I think it's because hard disks were becoming more common and there were better ways
of doing things. Now unless you have a real antique, you will only encounter in these days,
you don't encounter them much either, but you don't encounter three and a half inch disks
in either the double density or high density variety. I think by now if you found any at all,
they'd probably be high density. Looking at the disk from the top, you will see a small rectangular
cutout on high density disks that is not there on double density disks. Now back in the day,
people made punches that would cut out that little rectangular hole and kind of force
a double density disk to form that as high density. This was a very risky procedure
because the double density disks were not engineered to handle that and floppy disks in general
were already fairly unreliable. And when you can get brand new high density disks in those days,
I could pick them up for 50 cents a piece, American. Why would you do a thing like that?
Now the format command is what you use to have the drive be format.
So what are the arguments? Well, the drive that you want to format and there are also switches.
Now note that you cannot format a hard drive if you have booted into it.
So if you wanted to format a hard drive and it was a single hard drive in the computer,
you would have to do first is boot from a floppy disk and you would have to have the format command
on it and then booting with the floppy disk, you could use the format command to format the hard drive.
Now the thing that you always had to remember with this still is true is that formatting destroys
all the files on the drive. So you should only use this command if you're absolutely certain you
know what you're doing and do not need anything stored on that drive. So let's say you had a computer,
you wanted a format of floppy. Well, at the command prompt, you would use the command format,
space, a colon, assuming your floppy disk is in the a drive.
Now you could format it to a certain size with the slash capital F switch.
So at the command prompt, you could say format, space, a colon, space, slash F colon 720 as an example.
And this would format the floppy disk in the a drive as a double density 720K disk.
Even if it is a high density disk capable of being formatted for 1.44 megabytes,
you might think, well, why on earth would anyone ever want to do that? Well, this can be handy if
you want to make a backup copy of a double density disk using disk copy, but you only have high
density blank disks available. Now, as I said previously, going to a lower density is probably fine,
going to a higher density than the disk was engineered for is extremely problematic.
Well, you can also use the format command to create a boot disk.
And that's with a switch, the slash S switch. So you would put your floppy disk in the drive.
Again, I'm going to assume it's the a drive. And at the command prompt, you would type in format,
space, a colon, space, slash S. And the slash S has made this a system disk.
We already talked about that in a previous tutorial about how certain files have to go in exactly
the right place and all of that. So this will make sure all of that stuff happens.
You can go back and review that earlier tutorial if you're not sure about that.
Now, what about formatting a hard drive?
Remember I said you cannot format the drive you booted. So what you would have to do is you'd have
to first of all have a floppy disk available that is a system disk that you can boot from.
And it have to have the format command on it. Now, format is an external command.
So that means creating a system disk by itself does not mean you're going to have the format command
available. You actually have to copy it on there in order to make sure that you have it available.
That's that's what you have to do with all external commands. Remember, the internal ones are
part of command comm. So when you create a system disk, they're already available to you.
Sort of like the shell commands in UNIX.
So let's say you have this floppy disk. I'll assume that it's in the A drive at the command prompt.
You want to type in format space C colon, assuming in this case that it's the C drive that you want
to format. And this will format the C drive. Now, if you want to make this a bootable C drive,
I want to boot from it from now on, you probably can guess it's that slash S switch again.
So at the command prompt, you would type in format space C colon, space slash S. And this will
format the C drive and copy system files to it. Now, if you're installing DOS, you might as well
just let the installation program handle the formatting as well. So if you had an installation
disk for DOS, just put that in the A drive and let it do its thing.
Copy. Now, the copy command will, as the name implies, copy files from one place to another.
Easy peasy. Arguments are the file to be copied and the file in path it will be copied to.
Now, there are some switches. You could include a slash Y switch. And that is basically saying
automatically answer yes every time a file is going to be overwritten. Normally, the program will
stop at that point and say, hey, you're overwriting a file. Do you really want to do this type? Yes,
if you're sure. The switch slash Y says, just answer yes all the time. Don't worry about it.
But there is an opposite one slash dash Y or minus Y. And that will do the opposite who require
a prompt any time a file is being overwritten. And finally, there's a slash V to verify the
contents of the copy. So at the command prompt, you could copy like type the command,
c-o-p-y-space-myfile.txt-space2. You know, space is a-colon-backslash-myfile.txt. And this will
copy the file, myfile.txt from the working directory, wherever you are, to the root directory of
the floppy disk in the a drive. It's going to be the root directory because you didn't specify
any other directory. Now, let's say you want to put it in a specific place and we're going to
eventually get around to why that's a good idea probably in the next tutorial. So let's say copy
space-myfile.txt-space-c-colon-backslash-docs-backslash-myfile.txt-space-slashV. And this will copy it to
the docs directory on the C drive and will verify the contents. Now, you can also use the copy
command to combine and append files. So, at the command prompt, you could do something like copy
space-myfile1.txt plus sign-myfile2.txt-space-myfile3.txt. This will combine the two files-myfile1.txt and
myfile2.txt and place them in a new file called myfile3.txt. Now, next command disk copy.
This command is used to make an exact copy of a diskette. It cannot be used to clone a hard drive,
however. So, it's a diskette command, not a hard drive command. Arguments are the disk drives being used,
switches include the slash v to verify the contents of the copy. This command was most often used
to make backup copies of software on diskettes back in the days when software actually came on disk
but it can be used to make duplicates of other disks as well. So, command would just be disk
copy, DISK, COPY, space, A-colon, space, B-colon. Now, this would copy the contents of the
diskette in the A drive to the diskette in the B drive. Now, if the diskette in the B drive had
any data on it, that data is erased in the copying process. You're making a literal copy of
that the disk in the A drive. If the diskette in the A drive was a bootable diskette with system
files, the diskette in the B drive will also be bootable with system files.
Now, if no second drive is specified, the same drive will be used for both disks and you'll
be prompted to switch diskettes. Now, my first computer had two floppy disk drives. They were
five-and-a-quarter inch version, but still. But there was a point where you had computers that
and partly is because as hard drives started to become a little more common, putting two floppy
drives in a computer was seen as wasteful so they're only putting one. Well, how do you copy
something? Well, in this case, what you do, you put the source diskette in the drive first,
issue the disk copy command and all of the disks contents will be copied into memory.
You will then be prompted to insert the target diskette in the same drive and the contents
held in memory will be copied to it. So, for instance, disk copy, space, A colon, space,
slash V, and this would use the A drive for both the source and the target diskette and would
verify the contents of the target disk after the copying.
X copy, this is another useful one and it's designed to copy entire directories along with all
of their sub-directories and all of the files contained in those sub-directories.
Arguments are the files and path to be copied and the place to copy them to.
Switches include slash A. Slash A copies only files that have been set as archive files.
That's covered in the attribute command, so it's an attribute that files have.
The copied files will still be marked as archive files in both the source and destination.
Another switch is slash D for date.
Copies only those files in the source directory that have been changed on or later than the
specified date. Now, when you're looking at these, you're going to start seeing X copy was
very useful for doing backups and that was one of the things that was very often used for
back in the day. Another switch for the disk copy slash S copies all files in the current directory
and in any sub-directorie within it. Slash E which must be used with the slash S. The slash E says
copy sub-directories even if they're empty and then slash V as usual verifies that the copies
have been made. Now, this is a very powerful command and very useful, particularly as I said,
for backing up purposes and you could even use it to back up an entire hard drive.
Might take a while, but you could do it. You can use the archive attribute to specify which files
will or will not be filed based on file type, where you can use the file date to only copy files
have been altered after a certain date, for instance, since your last backup.
X copy is also useful in copying all of the files from one floppy disk to another in cases where
the disk copy command cannot be used, such as when the disks are different types or different
sizes. But note that in this case, if the source diskette is bootable, the target diskette will not
be. Only disk copy can pull that one off. So, example, X copy, space, C colon, backslash,
docs, space, decolon, backslash, backup, backslash, docs, backslash, space, slash s.
Now, this will copy the entire contents of the directory, C colon, backslash, docs,
including all sub-directories in their contents, except for any empty sub-directories,
because we didn't use the slash e-switch, and place them on drive d in the directory decolon,
backslash, backup, backslash, docs, backslash. Now, if you wanted to copy the empty sub-directories
as well, the command becomes X copy, space, C colon, backslash, docs, space, decolon, backslash,
backup, backslash, docs, backslash, space, slash s, space, slash e.
And with that, this is a hookah for Hacker Public Radio, signing off,
and as always, encouraging you to support FreeSoftware. Bye-bye.
Today's show, like all our shows, was contributed by an HBR listener like yourself.
If you ever thought of recording a podcast, then click on our contributing to find out how easy it really is.
Hacker Public Radio was founded by the digital dog pound and the infonomicom computer club,
and is part of the binary revolution at binrev.com.
If you have comments on today's show, please email the host directly,
leave a comment on the website, or record a follow-up episode yourself.
Unless otherwise stated, today's show is released under creative comments,
attribution, share a light, free.or license.