• Please review our updated Terms and Rules here

DOS: Copying hidden files

nc_mike

Experienced Member
Joined
Sep 28, 2014
Messages
473
Embarrassed to admit that its been far too long. I am using IBM DOS 2000 on a PC/XT and have a 5.25" floppy disk (disk is read only) with a program that has files I can copy to a 3.5" or HDD, but has one hidden file. I don't think the /H option works on XCOPY until after DOS 7 - so what options do I have to either copy the contents including the hidden file to a 3.5" floppy or HDD? Third party copy util?

Regards,
Mike
 
Diskcopy will copy the entire disk to another disk -- including the Hidden file(s) although that won't quite work in this particular instance.

A file manager will copy the Hidden files anywhere.

Alternatively, you can remove the Hidden attribute with List (or any utility of your choice) and then restore the Hidden attribute (if you wish) after the file has been copied by any normal means. Of course, if you're using List you could just copy the Hidden file directly. :smile:

You can ZIP the floppy and unZIP it to the other size floppy.

The possibilities are quite numerous and these are only some of them.
 
Embarrassed to admit that its been far too long. I am using IBM DOS 2000 on a PC/XT and have a 5.25" floppy disk (disk is read only) with a program that has files I can copy to a 3.5" or HDD, but has one hidden file. I don't think the /H option works on XCOPY until after DOS 7 - so what options do I have to either copy the contents including the hidden file to a 3.5" floppy or HDD? Third party copy util?

Regards,
Mike

On a DOS file you could use ATTRIB -H [drive:][path][filename]. To hide the file again use +H
 
I'd look for a third-party utility (from, say, the SIMTEL MS-DOS collection). Heck, there's probably one of my own in there. About 30 years ago, I wrote a simple utility called "mv", which sort of corresponds to UNIX mv. It copies file attributes and isn't blind to hidden files. If you want a copy, I can post it: I'm certain that there are better utilities, but maybe this will be enough.

Code:
                  Mv - Move files/directories

                   Copyright 1987, C. P. Guzis
                              SYDEX
                      153 North Murphy Ave.
                      Sunnyvale, CA  94086
                       All rights reserved

 Mv's syntax is -

        mv [/ekoq] source [source...] destination

        Options -

        E - retain Existing destination files
        K - Keep source files (copy, don't delete)
        O - Overwrite existing destination files
        Q - Query prompt for each file to be moved

        If neither E nor O is specified, a prompt is issued for
        each pre-existing destination file before overwriting.

About 2.8KB long, so it easily fits on even a crowded floppy.
 
I found a utility I'll try from ToolBox - it appears to have an enhanced MOVE.EXE utility with a copy only option that will copy all files, including ones with the hidden attribute set. The ATTRIB -H command won't work in this case because the program diskette is R/O.

Regards,
Mike
 
How is the made disk read only?

Um, if it's a 5.25", either it has no write enable notch (common on OEM program disks) or has a write-protect tab installed.
If it's a 3.5", the write-enable shutter is not present or is placed in the write-disable mode.

Yes, you can work around these. (notch an un-notched 5.25" or cover the write-disable hole on a 3.5").
 
Um, if it's a 5.25", either it has no write enable notch (common on OEM program disks) or has a write-protect tab installed.

Yes, you can work around these. (notch an un-notched 5.25").
Thanks, Chuck, I didn't think it was rocket science. :)

You could also make a copy of the original and that wouldn't be write-protected from the getgo.
 
Thanks, Chuck, I didn't think it was rocket science. :)

You could also make a copy of the original and that wouldn't be write-protected from the getgo.

Correct, it is a 5 1/4 inch floppy without a notch. Copying doesn't work because the hidden attribute is set on one of the files; that is what I am trying to get around.

Mike
 
Correct, it is a 5 1/4 inch floppy without a notch. Copying doesn't work because the hidden attribute is set on one of the files; that is what I am trying to get around.

Mike

You should be able to use DISKCOPY to copy all of the files, hidden or not, to another disk. You could then invoke ATTRIB -H X:*.* (where X is your drive and *.* is the wild card).
 
Back
Top