github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/commands/rclone_copyto.md (about)

     1  ---
     2  title: "rclone copyto"
     3  description: "Copy files from source to dest, skipping identical files."
     4  slug: rclone_copyto
     5  url: /commands/rclone_copyto/
     6  groups: Copy,Filter,Listing,Important
     7  versionIntroduced: v1.35
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/copyto/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone copyto
    11  
    12  Copy files from source to dest, skipping identical files.
    13  
    14  ## Synopsis
    15  
    16  
    17  If source:path is a file or directory then it copies it to a file or
    18  directory named dest:path.
    19  
    20  This can be used to upload single files to other than their current
    21  name.  If the source is a directory then it acts exactly like the
    22  [copy](/commands/rclone_copy/) command.
    23  
    24  So
    25  
    26      rclone copyto src dst
    27  
    28  where src and dst are rclone paths, either remote:path or
    29  /path/to/local or C:\windows\path\if\on\windows.
    30  
    31  This will:
    32  
    33      if src is file
    34          copy it to dst, overwriting an existing file if it exists
    35      if src is directory
    36          copy it to dst, overwriting existing files if they exist
    37          see copy command for full details
    38  
    39  This doesn't transfer files that are identical on src and dst, testing
    40  by size and modification time or MD5SUM.  It doesn't delete files from
    41  the destination.
    42  
    43  **Note**: Use the `-P`/`--progress` flag to view real-time transfer statistics
    44  
    45  
    46  ```
    47  rclone copyto source:path dest:path [flags]
    48  ```
    49  
    50  ## Options
    51  
    52  ```
    53    -h, --help   help for copyto
    54  ```
    55  
    56  
    57  ## Copy Options
    58  
    59  Flags for anything which can Copy a file.
    60  
    61  ```
    62        --check-first                                 Do all the checks before starting transfers
    63    -c, --checksum                                    Check for changes with size & checksum (if available, or fallback to size only).
    64        --compare-dest stringArray                    Include additional comma separated server-side paths during comparison
    65        --copy-dest stringArray                       Implies --compare-dest but also copies files from paths into destination
    66        --cutoff-mode HARD|SOFT|CAUTIOUS              Mode to stop transfers when reaching the max transfer limit HARD|SOFT|CAUTIOUS (default HARD)
    67        --ignore-case-sync                            Ignore case when synchronizing
    68        --ignore-checksum                             Skip post copy check of checksums
    69        --ignore-existing                             Skip all files that exist on destination
    70        --ignore-size                                 Ignore size when skipping use modtime or checksum
    71    -I, --ignore-times                                Don't skip items that match size and time - transfer all unconditionally
    72        --immutable                                   Do not modify files, fail if existing files have been modified
    73        --inplace                                     Download directly to destination file instead of atomic download to temp/rename
    74        --max-backlog int                             Maximum number of objects in sync or check backlog (default 10000)
    75        --max-duration Duration                       Maximum duration rclone will transfer data for (default 0s)
    76        --max-transfer SizeSuffix                     Maximum size of data to transfer (default off)
    77    -M, --metadata                                    If set, preserve metadata when copying objects
    78        --modify-window Duration                      Max time diff to be considered the same (default 1ns)
    79        --multi-thread-chunk-size SizeSuffix          Chunk size for multi-thread downloads / uploads, if not set by filesystem (default 64Mi)
    80        --multi-thread-cutoff SizeSuffix              Use multi-thread downloads for files above this size (default 256Mi)
    81        --multi-thread-streams int                    Number of streams to use for multi-thread downloads (default 4)
    82        --multi-thread-write-buffer-size SizeSuffix   In memory buffer size for writing when in multi-thread mode (default 128Ki)
    83        --no-check-dest                               Don't check the destination, copy regardless
    84        --no-traverse                                 Don't traverse destination file system on copy
    85        --no-update-dir-modtime                       Don't update directory modification times
    86        --no-update-modtime                           Don't update destination modtime if files identical
    87        --order-by string                             Instructions on how to order the transfers, e.g. 'size,descending'
    88        --partial-suffix string                       Add partial-suffix to temporary file name when --inplace is not used (default ".partial")
    89        --refresh-times                               Refresh the modtime of remote files
    90        --server-side-across-configs                  Allow server-side operations (e.g. copy) to work across different configs
    91        --size-only                                   Skip based on size only, not modtime or checksum
    92        --streaming-upload-cutoff SizeSuffix          Cutoff for switching to chunked upload if file size is unknown, upload starts after reaching cutoff or when file ends (default 100Ki)
    93    -u, --update                                      Skip files that are newer on the destination
    94  ```
    95  
    96  ## Important Options
    97  
    98  Important flags useful for most commands.
    99  
   100  ```
   101    -n, --dry-run         Do a trial run with no permanent changes
   102    -i, --interactive     Enable interactive mode
   103    -v, --verbose count   Print lots more stuff (repeat for more)
   104  ```
   105  
   106  ## Filter Options
   107  
   108  Flags for filtering directory listings.
   109  
   110  ```
   111        --delete-excluded                     Delete files on dest excluded from sync
   112        --exclude stringArray                 Exclude files matching pattern
   113        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
   114        --exclude-if-present stringArray      Exclude directories if filename is present
   115        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
   116        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
   117    -f, --filter stringArray                  Add a file filtering rule
   118        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
   119        --ignore-case                         Ignore case in filters (case insensitive)
   120        --include stringArray                 Include files matching pattern
   121        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
   122        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   123        --max-depth int                       If set limits the recursion depth to this (default -1)
   124        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
   125        --metadata-exclude stringArray        Exclude metadatas matching pattern
   126        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
   127        --metadata-filter stringArray         Add a metadata filtering rule
   128        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
   129        --metadata-include stringArray        Include metadatas matching pattern
   130        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
   131        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   132        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
   133  ```
   134  
   135  ## Listing Options
   136  
   137  Flags for listing directories.
   138  
   139  ```
   140        --default-time Time   Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z)
   141        --fast-list           Use recursive list if available; uses more memory but fewer transactions
   142  ```
   143  
   144  See the [global flags page](/flags/) for global options not listed here.
   145  
   146  # SEE ALSO
   147  
   148  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   149