File Transfers, Listing, and Verification
Last updated on 2026-08-23 | Edit this page
Estimated time: 25 minutes
Overview
Questions
- How are files moved or copied?
- What does the rclone sync do?
- How do you see what is already in the destination?
Objectives
- Understand the difference between copy and sync
- Be able to list what is already in the destination
- Compare rclone command syntax between Linux/macOS and Windows (including WSL2)
Moving files around
Rclone is most frequently used to move files, individually or as a group from one place to another.
Specifying source and destination paths
Moving, syncing and knowing what is already there
Lists contents of a remote:
Copy local files to remote:
Sync local files to remote:
Filtering
Many rclone commands resemble their Unix counterparts, such as
ls. Rclone selects which files a command applies to using
flags such as --include and --exclude, rather
than shell wildcard expansion, so quote the pattern (for example,
--include "*.txt") to keep your shell from expanding it
first.
Some Examples:
Copying local files to an external drive (Windows using the Linux subsystem)
Copying files from Google Drive and filtering for
*.txt
BASH
rclone copy rclone-intro-google:rclone-intro-google rclone-intro-box:rclone-intro --include "*.txt"
Checking a result before running by using the -n
flag
OUTPUT
2025/02/09 14:52:11 NOTICE: Beans, Snap and Italian – Pieces, Green and Wax - National Center for Home Food Preservation.pdf: Skipped copy as --dry-run is set (size 91.581Ki)
2025/02/09 14:52:11 NOTICE: For Safety's Sake - National Center for Home Food Preservation.pdf: Skipped copy as --dry-run is set (size 69.982Ki)
2025/02/09 14:52:11 NOTICE: Preserving_Food__Using_Pressure_Canners.pdf: Skipped copy as --dry-run is set (size 3.839Mi)
2025/02/09 14:52:11 NOTICE: Selecting the Correct Processing Time - National Center for Home Food Preservation.pdf: Skipped copy as --dry-run is set (size 123.316Ki)
2025/02/09 14:52:11 NOTICE: test01.txt.docx: Skipped copy as --dry-run is set
2025/02/09 14:52:11 NOTICE: USDA-Complete-Guide-to-Home-Canning-2015-revision.pdf: Skipped copy as --dry-run is set (size 16.518Mi)
2025/02/09 14:52:11 NOTICE: Potatoes, Sweet – Pieces or Whole - National Center for Home Food Preservation.pdf: Skipped copy as --dry-run is set (size 87.602Ki)
2025/02/09 14:52:11 NOTICE:
Transferred: 21.079 MiB / 21.079 MiB, 100%, 0 B/s, ETA -
Checks: 3 / 3, 100%
Transferred: 8 / 8, 100%
Elapsed time: 2.0s
Predict, then verify
You have a disposable rclone-workshop folder with these
files:
OUTPUT
source/notes.txt
source/data.csv
source/photo.jpg
dest/old-report.pdf
dest/old-report.pdf does not exist in
source.
Before running anything, predict the answers:
- Will
rclone copy source dest --include "*.txt" --dry-runtouchold-report.pdf? - Will
rclone sync source dest --dry-runtouchold-report.pdf? If so, how?
Then run both commands against your own disposable folder and check your predictions against the real output.
--dry-run never changes anything on disk — it only
reports what would happen, which makes it safe to run as many
times as you like while you’re predicting.
OUTPUT
2026/08/23 13:37:13 NOTICE: notes.txt: Skipped copy as --dry-run is set (size 14)
2026/08/23 13:37:13 NOTICE:
Transferred: 14 B / 14 B, 100%, 0 B/s, ETA -
Checks: 0 / 0, -, Listed 1
Transferred: 1 / 1, 100%
Elapsed time: 0.0s
copy never mentions old-report.pdf — it
only ever adds or updates files, so anything already at the destination
but missing from the source is simply left alone.
OUTPUT
2026/08/23 13:37:14 NOTICE: notes.txt: Skipped copy as --dry-run is set (size 14)
2026/08/23 13:37:14 NOTICE: photo.jpg: Skipped copy as --dry-run is set (size 6)
2026/08/23 13:37:14 NOTICE: data.csv: Skipped copy as --dry-run is set (size 6)
2026/08/23 13:37:14 NOTICE: old-report.pdf: Skipped delete as --dry-run is set (size 34)
2026/08/23 13:37:14 NOTICE:
Transferred: 26 B / 26 B, 100%, 0 B/s, ETA -
Checks: 1 / 1, 100%, Listed 4
Deleted: 1 (files), 0 (dirs), 34 B (freed)
Transferred: 3 / 3, 100%
Elapsed time: 0.0s
sync reports old-report.pdf as a file it
would delete, because sync makes the destination an
exact mirror of the source — this is exactly why sync exercises always
need --dry-run or --interactive first.
Different operating systems have slightly different syntax
Windows syntax:
- Linux and macOS:
BASH
rclone copy rclone-intro-box:rclone-intro rclone-intro-google:rclone-intro-google
rclone copy rclone-intro-box:rclone-intro rclone-intro-google:rclone-intro-google -n
Windows Subsystem for Linux (WSL2) syntax:
See the Learner Reference page for valid remote names, subcommand syntax, and platform-specific notes.
- Difference between Copy and Sync
- See what is already in the destination
-
--dry-runshows what a command would do, including deletions, without changing anything on disk