PDA

View Full Version : DOS: Copying hidden files



nc_mike
August 31st, 2015, 08:12 AM
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

Stone
August 31st, 2015, 08:44 AM
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.

Agent Orange
August 31st, 2015, 08:49 AM
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

Chuck(G)
August 31st, 2015, 09:18 AM
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.


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.

nc_mike
September 1st, 2015, 08:31 AM
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

Stone
September 1st, 2015, 09:19 AM
How is the made disk read only?

Chuck(G)
September 1st, 2015, 09:35 AM
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").

Stone
September 1st, 2015, 09:47 AM
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.

nc_mike
September 1st, 2015, 07:44 PM
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

Chuck(G)
September 1st, 2015, 07:51 PM
Try using this file, with the /k option ("keep originals"), e.g. mv /k a:*.* c:\

It should do the job.

Agent Orange
September 1st, 2015, 08:02 PM
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).

nc_mike
September 2nd, 2015, 06:58 AM
Try using this file, with the /k option ("keep originals"), e.g. mv /k a:*.* c:\

It should do the job.

MV.COM worked very simply and very nicely, thank you!

Mike