logo elektroda
logo elektroda
X
logo elektroda

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

cmurek 53308 10
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 2524643
    cmurek
    Level 16  
    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  
    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  
    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  
    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.
  • #5 2524836
    max_gg
    Level 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  
    And what is the command to delete a folder. Please provide an example.
  • ADVERTISEMENT
  • #8 2524863
    max_gg
    Level 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 38  
    del c: \ directory If it is not empty, you must confirm the deletion or use the / s switch.
  • #10 2524887
    tzok
    Moderator of Cars
    Use the deltree command to delete directory structures and xcopy to copy directory structures
  • #11 2529373
    Gutek666
    Level 19  
    mate, type se the command "help" and I will show you all the commands with descriptions of what it is for

Topic summary

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.
Summary generated by the language model.
ADVERTISEMENT