mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-09-01 15:51:29 +08:00
copy: add page (#21006)
Co-authored-by: Adriano Inghingolo <68734231+SpikeTheDragon40k@users.noreply.github.com> Co-authored-by: Meinard Francisco <44516102+znarfm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c738f1b2f9
commit
bd0de148af
@@ -0,0 +1,29 @@
|
||||
# copy
|
||||
|
||||
> Copy files from one location to another.
|
||||
> In PowerShell, this command is an alias of `Copy-Item`. This documentation is based on the Command Prompt (`cmd`) version of `copy`.
|
||||
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/copy>.
|
||||
|
||||
- Copy a file to another location:
|
||||
|
||||
`copy {{path\to\source_file}} {{path\to\target_file}}`
|
||||
|
||||
- Copy a file into another directory, keeping the filename:
|
||||
|
||||
`copy {{path\to\source_file}} {{path\to\target_directory}}`
|
||||
|
||||
- Copy multiple files to a directory:
|
||||
|
||||
`copy {{path\to\file1 path\to\file2 ...}} {{path\to\target_directory}}`
|
||||
|
||||
- Copy all files from one directory to another directory:
|
||||
|
||||
`copy {{path\to\source_directory\*}} {{path\to\target_directory}}`
|
||||
|
||||
- Copy files with a specific extension:
|
||||
|
||||
`copy {{path\to\source_directory\*.ext}} {{path\to\target_directory}}`
|
||||
|
||||
- Copy a file and prompt before overwriting:
|
||||
|
||||
`copy /-y {{path\to\source_file}} {{path\to\target_file}}`
|
||||
Reference in New Issue
Block a user