Commands
cp
Copy files between local disk and Poly, or within Poly.
poly cp copies files and folders. Depending on the paths you give it, that copy can be an upload, a download, or a copy within Poly — the direction is detected automatically.
Usage
poly cp <PATHS...> [-f|--force]
Pass two or more paths; the last one is always the destination. Each PATH can be a local path, a //-prefixed Poly path, a deep link, or a web URL — see How it Works. Poly compares the source and destination references to decide whether it's uploading local bytes, downloading to disk, or copying between two Poly locations.
Files can't be moved across drives — for example, from a shared drive into your personal Home, or between two shared drives. That kind of cross-drive transfer must be a copy; use poly cp even where you'd otherwise reach for mv.
Flags
| Flag | Description |
|---|---|
-f, --force | Skip confirmation prompts. |
Examples
# Upload a local file into Poly
poly cp ./report.pdf //Home/docs/
# Download a Poly file to the current directory
poly cp //Home/docs/report.pdf .
# Copy a file within Poly
poly cp //Home/docs/report.pdf //Home/archive-copies/
# Copy multiple local files into one Poly folder
poly cp ./a.txt ./b.txt //Home/notes/
# Copy a file across shared drives (moves aren't allowed here)
poly cp //shared/team-a/Home/plan.md //shared/team-b/Home/
# Force a copy without confirmation prompts
poly cp ./big-export.csv //Home/data/ --force
Related
mv— move a file within Poly instead of copying it.rm— soft-delete a file to Archive.- How it Works — file reference syntax and upload/download behavior.