Instantly Transfer Files Between PC and Phone with QR Codes Using qrcp
This guide explains how the qrcp command‑line tool creates a temporary web server, encodes its address in a QR code, and enables fast, cross‑device file transfers, covering installation via Go or binary, usage commands, network‑interface selection, and practical examples.
What is qrcp?
qrcp is a lightweight command‑line utility that creates a temporary HTTP server, encodes its address in a QR code, and lets you transfer files between a computer and a mobile device simply by scanning the code.
How it works
The program binds a web server to a random port on the machine’s Wi‑Fi interface, generates a URL of the form http://{address}:{port}/{random_path}, and prints a QR code that encodes this URL. Scanning the QR code opens the URL in the phone’s browser, where the file can be downloaded or uploaded.
Installation
You can install qrcp either via Go (requires Go 1.8) or by downloading a pre‑built binary. go get github.com/claudiodangelis/qrcp Or download the latest release, place the binary in a directory on your $PATH (e.g., /usr/local/bin) and make it executable:
chmod +x /usr/local/bin/qrcpBasic usage
Send a single file: qrcp MyDocument.pdf Send multiple files – qrcp automatically creates a zip archive and removes it after the transfer:
# Multiple files
qrcp MyDocument.pdf IMG0001.jpg
# Whole folder
qrcp Documents/Compress before sending: qrcp --zip LongVideo.avi Receive files (the tool shows an upload page; the received files are saved in the current directory): qrcp receive To receive into a specific directory, run the same command from that directory or move the files after transfer.
Selecting a network interface
By default qrcp picks a suitable interface. Use -i or --interface to choose one explicitly:
# Bind to a specific interface
qrcp -i tun0 MyDocument.pdf
# Bind to all interfaces (0.0.0.0)
qrcp -i any MyDocument.pdfThis is useful when transferring files from cloud VMs such as EC2, DigitalOcean Droplets, or GCP instances.
Visual guide
Project statistics
On GitHub the repository https://github.com/claudiodangelis/qrcp has earned 5.6 K stars and 286 forks.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
