logo elektroda
logo elektroda
X
logo elektroda

Copy Entire Folder in DOS Command Line: Partition-to-Partition Transfer Guide

cmurek 56353 10
Best answers LABEL_AI_GENERATED

How do I copy an entire folder, including subfolders, from one partition to another in DOS?

Use XCOPY to copy directory structures between partitions; plain COPY is only for files in a single folder and does not handle a whole tree with subfolders [#2524887][#2524753] If the folder has no subfolders, create the destination directory first with MD or MKDIR and then copy the files, for example: `D:` `MD AAA` `COPY C:\AAA\*.* D:\AAA` [#2524725] If the folder contains subdirectories, you must create each target directory first and copy the subdirectories one by one [#2524725][#2524836] On Win98, XCOPY is also mentioned as faster and having additional capabilities [#2524753]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 2524643
    cmurek
    Level 16  
    Posts: 278
    Help: 4
    Rate: 5
    The question is like in a teamcie. I need to copy an entire folder from one partition to another and I don't know the command for that. If someone could write it for me, I would be grateful.
  • ADVERTISEMENT
  • Helpful post
    #2 2524725
    Orochimaru
    Level 31  
    Posts: 1198
    Help: 170
    Rate: 532
    This can be done at one time, but only if the folder does not contain any subfolders
    on, we copy the entire AAA directory from drive C to D

    d:
    md AAA
    copy c: \ AAA \ *. * d: \ AAA

    If there are subfolders, each of them must be copied separately, previously creating the target directory with the "md" command
  • ADVERTISEMENT
  • Helpful post
    #3 2524753
    max_gg
    Level 26  
    Posts: 631
    Help: 83
    Rate: 26
    Hello!

    copy x: \ {directory1} \ *. * y: \ {directory2}

    where x and y - partition letters for you, {directory1} and {directory2} - directories you want to copy.

    Available in all "Lifts".


    Win98 also has the xcopy command - it works a bit faster, the syntax is as above, but has additional capabilities. And "move" - also moves directories.

    Regards!

    Marcin "Max" G.
  • ADVERTISEMENT
  • #4 2524797
    cmurek
    Level 16  
    Posts: 278
    Help: 4
    Rate: 5
    My colleagues who wanted to help me wrote it not very clearly. I have many subdirectories in this folder and also files that I would also like to move. I don't know how to copy it all.
  • ADVERTISEMENT
  • DOS directory creation, navigation, and copying workflow

    #5 2524836
    max_gg
    Level 26  
    Posts: 631
    Help: 83
    Rate: 26
    You have to create directories one by one - with the md command (or mkdir - the same thing).
    Then, successively copy individual directories.
    You enter subdirectories with the command cd .: (CD {directory})
    To the parent directory - CD .. (there are two dots here - necessary).
    To the root directory: CD \

    And if you find it difficult or time-consuming (because it is), try looking for Norton Commander (or something similar). Or some Live Linux distro - Midnight Commander is there. These programs are file managers for DOS (Linux) - they will make your task easier.
  • #6 2524847
    cmurek
    Level 16  
    Posts: 278
    Help: 4
    Rate: 5
    And what is the command to delete a folder. Please provide an example.
  • DOS directory removal with RD and DELTREE

    #8 2524863
    max_gg
    Level 26  
    Posts: 631
    Help: 83
    Rate: 26
    RMDIR {directory}
    or
    RD {directory}
    e.g.:
    RD \ windows ;)

    you must remember that the directory should be empty, so first:
    CD \ windows
    DEL *. *
    CD \ 'or CD ..
    RD \ windows

    Of course you have to delete all subdirectories.

    There is also the DELTREE command, but in WIN'95 and '98 (and in DOS, but only from 5.0).
    Deletes the specified directory, including all contents (subdirectories, files, etc.). Syntax:
    DELTREE {catalog}
  • #9 2524868
    stomat
    Level 39  
    Posts: 5733
    Help: 257
    Rate: 1986
    del c: \ directory If it is not empty, you must confirm the deletion or use the / s switch.
  • #10 2524887
    tzok
    VIP Meritorious for electroda.pl
    Posts: 38925
    Help: 3179
    Rate: 6567
    Use the deltree command to delete directory structures and xcopy to copy directory structures
  • #11 2529373
    Gutek666
    Level 19  
    Posts: 431
    Help: 20
    Rate: 4
    mate, type se the command "help" and I will show you all the commands with descriptions of what it is for

Topic summary

LABEL_AI_GENERATED
To copy an entire folder from one partition to another using DOS command line, the basic command is `copy x:{directory1}*.* y:{directory2}` where x and y are the partition letters. For folders containing subdirectories, the `xcopy` command is recommended for its additional capabilities, using the same syntax. If subdirectories exist, they must be created individually using the `md` (or `mkdir`) command, and files copied one by one. Alternatively, file management tools like Norton Commander or Linux-based file managers can simplify the process. To delete a directory, use `RMDIR {directory}` or `RD {directory}`, ensuring the directory is empty, or use `DELTREE {catalog}` to remove a directory and its contents in older Windows versions.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT