Difference between revisions of "Copy"

From wiki.amiga.org
Jump to navigation Jump to search
Line 100: Line 100:
 
 
 
 
 
 
 
 
 +
 
'''Example 2:'''
 
'''Example 2:'''
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
Line 107: Line 108:
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 +
 
'''Example 3:'''
 
'''Example 3:'''
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
Line 114: Line 116:
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 +
 
'''Example 4:'''
 
'''Example 4:'''
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
 
<pre style="color: black; background:lightgray; font-family:courier; width:60%">
Line 121: Line 124:
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 +
 +
In all of these examples the '''TO''' option can be omitted for convenience.
  
 
=Copyright=
 
=Copyright=
 
&nbsp;
 
&nbsp;
 
Copyright (C) 2021 AmigaKit Ltd.  Distributed with the Enhancer Software under licence.
 
Copyright (C) 2021 AmigaKit Ltd.  Distributed with the Enhancer Software under licence.

Revision as of 12:14, 22 May 2021

   

Description

The Copy command copies file(s) or directories from one location to another.

 

Installation

Commands Icon.jpg
The Copy command file is installed in the SYS:C/ directory by default.

 

Versions

  Latest versions are 46.6 and 54.6

Updater Icon.png
Use the Updater utility to upgrade to and install the latest available version.


   

Command Line Usage

   

FROM/M,TO/A,ALL/S,Q=QUIET/S,BUF=BUFFER/K/N,CLONE/S,DATES/S,NOPRO=NOPROTECTION/S
,COM=COMMENT/S,NOREQ=NOREQUESTERS/S,NOREP=NOREPLACE/S,INTER=INTERACTIVE=ASKREP
=ASKREPLACE/S,FORCE/S,NEWER/S,ARC=ARCHIVE/S,COPYLINKS/S,SPEED/S,STATS/S

   

Usage of options up to and including NOREQ is the same as with previous versions of Copy.


V46 / V54 only::

NOREP: Doesn't overwrite existing files.


INTER / ASKREP: Prompts user for confirmation to overwrite existing files.


FORCE: Overwrites existing files even if they are protected.


NEWER: Overwrites existing files only with ones that have more recent dates.


ARCHIVE: Copies only files that don't have the archive protection bit set, and sets the archive bit to the files in source that have been copied.


COPYLINKS: Also copies soft and hard links. This means that it replicates the soft or hard link. If it fails to replicate a hard link it then tries to replicate it as a soft link.


SPEED: Displays time and transfer rate information for the copy operation.

This is not an accurate indicator of the speed of the media used.
It is also affected by CPU and interface speed as well as copy buffer size.


STATS: Displays statistics such as number of files that have been copied,

have failed to be copied, or that were intentionally skipped.


Can be made resident: Yes

   


 

Example Usage

Here are some examples of using the Copy command in the Shell(CLI):

    Example 1:

1> Copy C: TO Backup:C

Copies the contents of the C: location to a directory called Backup:C. If the destination directory does not exist then the Copy command will create it before copying the contents to this location.    

Example 2:

1> Copy SYS:#?.info TO Backup:

This example uses a wildcard signified by #?. This specifies to copy all files with the .info extension from the SYS: location to Backup:.    

Example 3:

1.Backup:Devs> Copy Devs: TO ""

In this example we are currently changed directory to the Backup:Devs directory. The Copy command will copy all files from the Devs: location to the current directory. This is signified by the specifying the double quotes "" as the destination.    

Example 4:

1.Backup:Devs> Copy Devs: TO "" ALL

In this example we are currently changed directory to the Backup:Devs directory. The Copy command will copy all files and all directories from the Devs: location to the current directory. This is signified by the specifying the double quotes "" as the destination. The ALL option ensures that any directories in the source location will be copied in addition to any files.    

In all of these examples the TO option can be omitted for convenience.

Copyright

  Copyright (C) 2021 AmigaKit Ltd. Distributed with the Enhancer Software under licence.