Files and folders

Copy a folder

Copy a folder and everything in it, or just its contents into another folder.

Fill these in once
  1. Copy the whole folder
    Terminal
    cp -R my-folder backup
  2. Copy only what's inside it
    Terminal
    cp -R my-folder/. backup/
  1. Copy the whole folder
    Terminal · Ubuntu / Debian
    cp -R my-folder backup
  2. Copy only what's inside it
    Terminal · Ubuntu / Debian
    cp -R my-folder/. backup/
  1. Copy the whole folder
    PowerShell
    Copy-Item my-folder backup -Recurse
  2. Copy only what's inside it
    PowerShell
    Copy-Item my-folder\* backup -Recurse