Skip to main content

How to recover lost offline files: A step-by-step guide

6 min read

March 5, 2025

How to recover lost offline files: Your complete guide

Losing an offline file can be frustrating—especially when there's no cloud backup or version history to restore it. Whether you need to recover deleted files on Windows, retrieve lost documents from a hard drive, or figure out how to recover permanently deleted files on Mac, there are still ways to restore your data.

This guide walks you through the best file recovery methods for Windows and Mac, including using built-in tools like Windows File Recovery and third-party recovery software to recover lost files efficiently.

What causes data loss?

Losing offline files is common, and there are several reasons why it happens. Some of the most frequent causes include:

  • Accidental or malicious physical damage to the device or storage media—accidental spills, hardware failure, or power surges can corrupt or erase data from your hard drive, making file recovery more difficult
  • Theft of the device or storage media— losing a laptop, USB drive, or external hard drive can mean losing important files permanently, especially without a backup
  • Cyberattacks, malware, ransomware, and viruses—ransomware, viruses, and other security threats can encrypt or delete files, preventing access
  • Human error—accidentally deleting files or formatting a drive without a backup is one of the most common causes of data loss

Luckily, there are ways to recover lost files in the majority of cases. Your immediate response will be to check your Recycle Bin or Trash folder—but even when your lost files aren’t in one of these locations, they may still be recoverable. Whether you need to recover deleted files on Windows, use Windows File Recovery, or learn how to recover permanently deleted files on Mac, our handy guide will walk you through the best solutions to restore your data.

Person sits in a home office, holding a mobile device and thinking about how to recover their lost offline files.

How to recover lost offline files on Windows

Losing an offline file on Windows doesn’t always mean it’s gone forever. Even if it’s no longer in the Recycle Bin, there are still ways to recover deleted files on Windows—but acting fast is crucial.

For the best chance of success, stop using your device immediately after losing a file. When Windows deletes a file, the system marks its storage space as "free," but the actual file data may still exist until new data overwrites it. Using your device—especially saving new files or installing software—can reduce the effectiveness of Windows File Recovery and other recovery methods.

Below are step-by-step methods to recover lost files on Windows, including built-in tools and third-party recovery software.

Restoring lost files with Windows File Recovery

Windows File Recovery is a command line app available from the Microsoft Store. The ‘command line’ on your computer is a program that lets you create, delete, and navigate through files and folders.

File Recovery supports the Windows 11 operating system and the Windows 10 May 2020 update or higher. It can be used to recover files that can’t be restored from the Recycle Bin and have been lost from internal and external hard drives,  flash or USB drives, and SD cards.

There are two File Recovery modes:

  • Regular—for recovering recently deleted files from computers, external hard drives, and flash/USB drives with more than 4 GB of space
  • Extensive—for recovering files deleted some time ago, lost after formatting a disk or after a disk has been corrupted, and from the same storage media as Regular mode but also SD cards and flash/USB drives with less than 4 GB of space

These are the basic steps to using File Recovery:

1. Launch File Recovery, then in the Command Prompt window, type the following: winfr source-drive: destination-drive: [/mode] [/switches].

  • “source-drive” is where you are recovering your file(s) from, typically the operating system drive (“C:”).
  • “destination-drive” is where you want the recovered version of your file to be saved (“E:”).
    • Note: The source and destination drives must be different.
  • “mode” refers to Regular or Extensive.
  • “switches” are filters that scan for specific files. They begin with “/n” followed by a space and a backslash (\), then the file path.

2. For example, if you wanted to recover a file called “MyDocument” from your Documents folder using Regular mode, the path would look something like the following:

  • winfr C: E: /regular /n \Users\<username>\Documents\MyDocument.docx, where “<username>” is a placeholder for your username.

3. If your file or folder had a space in the title, such as “My Document”,  the entire path would need to be enclosed in quotes: 

  • winfr C: E: /regular /n “\Users\<username>\Documents\My Document.docx”.

4. After typing the command, File Recovery will prompt you to continue. Type Y, and the tool will start the recovery process.

5. If the tool can locate your file and successfully recover it, the file will be sent to a new folder called Recovery_<date and time> on your destination drive.

How to recover lost offline files on Macs

Losing an offline file on Mac doesn’t mean it’s gone forever. Just like on Windows, there are several ways to recover lost files, including built-in recovery options and command-line methods. These include:

  • A Command-Z (Ctrl-Z in Windows) function to undo the last command immediately after deleting a file
  • Restoring from Time Machine or another backup solution
  • Recovering from the command line interface—on a Mac, this is called Terminal

Terminal is an app you can access through Finder or Spotlight. It’s useful for a number of things, but for lost file recovery, it only really helps with files that are present in your device’s Trash folder.

To recover offline files from Trash using Terminal, take the following steps:

1. Launch Terminal, then type the command cd .Trash and hit the Enter button on your keyboard.

2. On the next line, type ls -al ~/.Trash then press Enter again to view the contents of Trash.

3. Type mv filename ../ where “filename” represents the name of the file you want to locate and recover, then hit Enter again.

  • Note: you need to use the full and exact file name for this to work.

4. Now type Quit to exit Terminal—your recovered file will be located in Finder.

The most reliable way to recover permanently deleted files on Mac is through a backup solution like Apple Time Machine or a cloud-based backup service. Without a backup, recovery options are limited, and some files may not be retrievable.

To prevent data loss in the future, consider using Dropbox Backup—it automatically saves your files to the cloud, ensuring they’re always protected and easy to restore.

Set up automatic backups for your peace of mind

Secure your files and recover any version effortlessly with Dropbox Backup. Stay prepared, no matter what happens.

Don’t wait until it’s too late—regularly backup your files

Recovering a lost offline file can be difficult and time-consuming—that’s why it’s important to back up your computer regularly to prevent irreversible data loss from happening in the first place.

Setting up a reliable backup system is the best way to prevent irreversible data loss before it happens.

Backups ensure that if your Mac or Windows device is damaged, stolen, or experiences a system failure, your files remain protected. The most effective approach is to store multiple backups across different locations—combining external storage with a secure cloud-based solution for added security.

Fortunately, setting up a backup system is much easier than trying to recover lost files. With Dropbox Backup, files are automatically protected in the cloud, ensuring they’re always accessible when you need them—without the hassle of manual backups.

Explore related resources

A professional works at a laptop while also writing something on paper.

How to back up your Windows PC to the cloud

Understand backup vs. archive in our guide. Learn when to use each method and how to keep your files secure, organized, and accessible.

A person sits at their kitchen table, eating breakfast and drinking juice as they back up files on their laptop.

How to save files to Dropbox Backup automatically

Never lose an important file again. Find out how to set up Dropbox Backup so your files and folders on your PC, Mac, or external drive are automatically backed up in the cloud.

Two people sit together at a kitchen table with a new laptop, trying to figure out how to move their files to the new device.

Get your Dropbox files on a new laptop, hassle free

How do you get files from an old computer to a new one? Discover how Dropbox Backup makes it quick, easy, and hassle free.