Image Map Image Map
Results 1 to 9 of 9

Thread: Automated copy of hidden/system files in DOS

  1. #1

    Default Automated copy of hidden/system files in DOS

    I want to be able to run a command line utility in DOS to copy *all* the contents of one drive to another, including hidden and system files. I know that modern versions of XCOPY support this through the /h switch, but the ones included with Windows98SE and classic DOSes do not. Any idea what other utility to use?

  2. #2

    Default

    Code:
    FreeDOS XCOPY command version 1.1---------------------------------
    Copies files and directory trees.
    
    
    XCOPY source [destination] [/switches]
    
    
      source       Specifies the directory and/or name of file(s) to copy.
      destination  Specifies the location and/or name of new file(s).
      /A           Copies only files with the archive attribute set and doesn't
                   change the attribute.
      /C           Continues copying even if errors occur.
      /D[:M/D/Y]   Copies only files which have been changed on or after the
                   specified date. When no date is specified, only files which are
                   newer than existing destination files will be copied.
      /E           Copies any subdirectories, even if empty.
      /F           Display full source and destination name.
      /H           Copies hidden and system files as well as unprotected files.
      /I           If destination does not exist and copying more than one file,
                   assume destination is a directory.
      /L           List files without copying them. (simulates copying)
      /M           Copies only files with the archive attribute set and turns off
                   the archive attribute of the source files after copying them.
      /N           Suppresses prompting to confirm you want to overwrite an
                   existing destination file and skips these files.
      /P           Prompts for confirmation before creating each destination file.
      /Q           Quiet mode, don't show copied filenames.
      /R           Overwrite read-only files as well as unprotected files.
      /S           Copies directories and subdirectories except empty ones.
      /T           Creates directory tree without copying files. Empty directories
                   will not be copied. To copy them add switch /E.
      /V           Verifies each new file.
      /W           Waits for a keypress before beginning.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file and overwrites these files.
      /-Y          Causes prompting to confirm you want to overwrite an existing
                   destination file.
    
    
    The switch /Y or /N may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.
    PM me if you're looking for 3" or 5" floppy disks. EMail For everything else, Take Another Step

  3. #3

    Default

    Thanks, I assume the freeDOS version has no issue running on PC-DOS / MS-DOS?

  4. #4

    Default

    I've been using it for years.

    Alternatively, you could use DOSVER to run anything you want under any version of DOS.
    PM me if you're looking for 3" or 5" floppy disks. EMail For everything else, Take Another Step

  5. #5

    Default

    Quote Originally Posted by maxtherabbit View Post
    I know that modern versions of XCOPY support this through the /h switch, but the ones included with Windows98SE and classic DOSes do not. Any idea what other utility to use?
    If you're using the win98 dos files to boot into plain dos, you're right. What you might not know is that the same command when run from within windows (command prompt) it has the additional switches and also preserves the long file names. Note that although it'll copy the hidden & system files you also need the /k switch to copy the attribute as well
    MS doc: https://support.microsoft.com/en-us/...opy32-commands

    I've used this for years to transfer whole windows installations to other disks, an xcopy and sys was all it took.

  6. #6

    Default

    Quote Originally Posted by konc View Post
    What you might not know is that the same command when run from within windows (command prompt) it has the additional switches and also preserves the long file names. Note that although it'll copy the hidden & system files you also need the /k switch to copy the attribute as well.
    I just checked and it's the same with Vista and 7.
    PM me if you're looking for 3" or 5" floppy disks. EMail For everything else, Take Another Step

  7. #7

    Default

    I always used to run ATTRIB *.* -h -r -s /s to unhide everything before then doing an XCOPY with /S /E. Only problem is it wouldn't get hidden directories.

    Does /h get hidden directories also?

  8. #8

    Default

    Quote Originally Posted by Stone View Post
    I just checked and it's the same with Vista and 7.
    If I understand you correctly I don't think there's another pure dos environment after win ME so naturally yes, every version after that has the additional switches.

  9. #9

    Default

    Well, you know MS and there's nothing to stop them from removing any specific feature for no apparent reason so it's always good to know for certain.
    PM me if you're looking for 3" or 5" floppy disks. EMail For everything else, Take Another Step

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •