Networking

How to Transfer Files Between Computers (Windows, Mac, Linux)

To transfer files between computers, pick the method that matches your situation: a USB drive or cloud upload for a few files, a shared folder for two computers on the same network, or a command such as robocopy or scp for large folders. This article covers each option with the exact steps and commands, for Windows, Mac and Linux.

Which method should you use?

SituationMethod
A few files, no network setup wantedUSB drive, or upload to cloud storage and download on the other computer
Two Windows PCs on the same networkShare a folder, then map it as a network drive
A large folder, or a copy you will repeat, on Windowsrobocopy
Linux or macOS, or any machine running an SSH serverscp or rsync
Windows and Mac on the same networkFile Sharing on the Mac

Two things apply to every network method below: both computers must be on the same local network (the same router, Wi-Fi or Ethernet), and both must be awake for the whole copy.

Option 1: A USB drive or external disk

This is the method with the fewest moving parts. Copy the files to the drive, eject it, plug it into the other computer and copy them off. It needs no network, no accounts and no settings. Two things to check first: the drive must have enough free space for what you are moving, and its file system must be readable on both computers. A drive formatted for one operating system may not be writable from the other, so check before you rely on it for a Windows-to-Mac move. Always use the eject or safely-remove option before unplugging, so pending writes are finished.

Option 2: Cloud storage

Upload the files to any cloud storage service from the first computer and download them on the second. This works across different networks and different operating systems, which is why it is the usual answer when the two computers are in different places. The limits are your upload speed, your storage quota, and the fact that the files pass through a third party's servers. For sensitive files, encrypt them before uploading. The encrypt tool on larely.com does this in the browser.

Option 3: Share a folder on Windows

This is Microsoft's documented route for two PCs on one network. On the computer that holds the files:

  1. Right-click the folder. On Windows 11, select Show more options first.
  2. Select Give access to, then Specific people.
  3. Pick a user on the network, or select Everyone to give all network users access. Sharing a folder also shares the files inside it.

On Windows 10 you can also select the folder, open the Share tab in File Explorer and choose Specific people in the Share with section.

On the computer that will receive the files:

  1. Open File Explorer (Windows key + E) and select This PC.
  2. On Windows 11, select More, then Map network drive. On Windows 10, use the Computer tab and select Map network drive.
  3. Choose a drive letter and enter the folder's network path in the Folder box, or select Browse. Select Reconnect at sign-in if you want the drive to return after a restart.
  4. Select Finish.

The folder now appears as a drive, and you copy files in File Explorer as usual.

If the other computer does not show up

Open File Explorer and go to Network. If a banner says network discovery is off, select it and choose Turn on network discovery and file sharing. On Windows 11 you can also search Settings for Manage advanced sharing settings and, under Private networks, turn on Network discovery and File and printer sharing. Set your Wi-Fi network to Private. Microsoft also lists turning off password protected sharing under All Networks, but that lets anyone on the network reach the shared folder without a password, so only do it on a network you trust and turn it back on afterwards. If the connection still fails, the source PC may be off, or you may not have permission to the folder.

Option 4: robocopy on Windows

robocopy is built into Windows and is better than dragging files in File Explorer for large or repeated copies, because it can resume and it prints a summary. The syntax is:

robocopy <source> <destination> [<file> [ ...]] [<options>]

To copy a folder, including subfolders and empty folders, from this PC to a shared folder on another one (the names here are examples):

robocopy C:\work\photos "\\OFFICE-PC\Transfer\photos" /E /Z /R:2 /W:5 /LOG:C:\work\copy.log

What the options do, from Microsoft's documentation:

  • /E copies subdirectories, including empty ones. /S skips empty ones.
  • /Z copies in restartable mode, so an interrupted file copy can pick up where it left off instead of starting again.
  • /R:n is the number of retries on a failed copy. The default is 1,000,000, which can make a copy appear to hang on a locked file, so set a small number.
  • /W:n is the wait between retries in seconds. The default is 30.
  • /MT:n copies with n threads (1 to 128, default 8), which helps with many small files.
  • /LOG:file writes the output to a log file so you can check it afterwards.

Be careful with /MIR. It mirrors the source and deletes destination files that do not exist in the source, so pointing it at the wrong folder deletes data. Use /L first, which only lists what would happen without copying anything.

robocopy also sets an exit code. A value of 1 means all files were copied successfully, and 0 means nothing needed copying. Any value of 8 or higher means at least one file failed.

Option 5: scp on Linux, macOS and Windows with OpenSSH

If the other computer runs an SSH server, scp copies files to or from it over an encrypted connection. The remote side is written as [user@]host:[path]:

scp report.pdf [email protected]:/home/alex/
scp -r ./photos [email protected]:/home/alex/photos
scp [email protected]:/home/alex/report.pdf ./

The -r option copies a whole directory recursively. If the SSH server listens on a port other than 22, use a capital -P, for example scp -P 2222 file alex@host:. The lowercase -p means something different: it preserves modification times and modes. The address 192.168.1.20 is an example; use the target computer's own address or hostname.

For one-off copies scp is enough. For big folders you will copy more than once, rsync skips files that have not changed and can resume; see scp vs rsync for the comparison.

Option 6: File Sharing on a Mac

To let other computers copy files from or to a Mac, turn on File Sharing:

  1. Choose Apple menu, then System Settings, click General, then Sharing.
  2. Under Content & Media, click the Info button next to File Sharing and turn it on.
  3. To share a specific folder, click the Add button under Shared Folders, choose the folder and click Open. Each user's Public folder is shared automatically.
  4. Under the Users list, add the people who may connect and choose an access level for each: Read & Write, Read Only, Write Only (Drop Box) or No Access.

In the folder's advanced options you can also choose Only allow SMB encrypted connections, and you can allow guest users. Leave guest access off unless you need it. Apple's page does not give the steps for connecting from Windows, so if you are moving files from a Mac to a PC, the simplest route is the reverse: share a folder from the Windows PC as described above and connect to it from the Mac.

Moving files between an iPhone or Mac and a Windows PC has its own set of options, covered in AirDrop to a PC: alternatives.

Check that the copy is complete

For anything important, do not trust that a long copy finished cleanly. Compare the number of files and the total size on both sides, read the robocopy log for failures, and for critical files compare checksums. The checksum tool on larely.com computes a hash of a file in your browser, so you can compare the source and the copy without uploading either.

Common problems

  • The copy is slow. Wi-Fi is usually the limit. Use Ethernet for large transfers, or a USB drive.
  • Access denied. The account you connect with has not been given access to the shared folder. Add that user under Give access to, or set the correct access level on the Mac.
  • Connection refused with scp. The target has no SSH server running, or a firewall blocks the port.
  • The transfer stalls on one file. With robocopy, a locked file triggers the default retry setting. Lower /R and /W and check the log afterwards for the files that failed.

Frequently asked questions

What is the easiest way to transfer files between two computers?
For a few files, a USB drive or a cloud storage upload works with no setup. For large folders on the same network, share a folder from one computer and copy from the other, or use robocopy on Windows or scp on Linux and macOS.
Can I transfer files between two computers without internet?
Yes. A USB drive needs no network at all, and folder sharing or scp only needs both computers on the same local network, such as the same router. An Ethernet cable between the two machines also works once both have addresses on the same network.
Why can't I see the other computer in Windows File Explorer?
Network discovery is probably off. In File Explorer, open Network and select the banner that says network discovery is off, then choose Turn on network discovery and file sharing. Also make sure the Wi-Fi or Ethernet network is set to Private.
Can I transfer files between a Windows PC and a Mac?
Yes. Turn on File Sharing on the Mac in System Settings, then connect from Windows to the Mac's shared folder, or share a folder from Windows and connect to it from the Mac. A USB drive formatted for both systems or a cloud service also works.
How do I make sure a big copy finished without errors?
robocopy prints a summary and sets an exit code. Any code of 8 or higher means at least one file failed to copy. For a stricter check, compare checksums of the source and the copy.

Sources