Opening a file means telling your computer which program should read it

When you open a file, you are instructing your computer to launch a program that can read and display that file's contents. The file itself — whether it is a document, image, video, or spreadsheet — sits on your hard drive or in cloud storage. Opening it does not move it or change it. It straightforward loads it into a program where you can view it, edit it, or use it.

Your computer decides which program to use based on the file's extension — the letters after the dot in the filename. A file named budget.xlsx has the extension .xlsx, which tells Windows or Mac that this is a spreadsheet file that should open in Excel or a similar program. A file named photo.jpg has the extension .jpg, which your computer recognizes as an image.

If you do not have the right program installed, your computer will either show an error or ask you to choose a program from a list. This is normal and does not mean the file is broken.

Key Takeaways

  • Double-clicking a file launches the program your computer has set as the default for that file type.
  • The file extension (the letters after the dot) tells your computer which program should open the file.
  • If you do not have the correct program installed, you can right-click the file and choose "Open with" to pick a different program.
  • Opening a file does not change or move the original file — it only displays its contents in a program.
  • Cloud files stored in Google Drive, OneDrive, or Dropbox open in your web browser or in the company's app, not in traditional desktop programs.

Double-clicking is the fastest way to open a file

On Windows or Mac, find the file on your desktop or in File Explorer (Windows) or Finder (Mac). Double-click it with your mouse or trackpad. Your computer will launch the program associated with that file type and display the file inside it.

This works because your operating system has a default program set for each file type. When you installed Microsoft Word, for example, Word registered itself as the default program for .docx files. Now every .docx file on your computer will open in Word when you double-click it.

If the file does not open, or if it opens in the wrong program, your computer either does not have the correct program installed, or the file extension is corrupted or unrecognized.

Right-click to open a file with a different program

If you want to open a file with a program other than the default, right-click the file (or Control-click on Mac). A menu will appear with options including "Open with" or "Open with..." followed by a list of programs.

Select the program you want. The file will open in that program this time, but the default will not change. The next time you double-click the same file, it will still open in the original default program.

If the program you want is not in the list, click "Open with" or "Choose another app" to see all installed programs. On Mac, this option is called "Open With" and appears near the top of the menu.

Changing the default program for a file type

If you want a different program to open every time you double-click a certain file type, you can change the default. On Windows, right-click any file of that type, select "Open with," then "Choose another app." At the bottom of the list, check the box that says "Always use this app to open [file type] files," then click the program you want.

On Mac, select any file of that type, then go to File menu and choose "Get Info." Under "Open with," select the program you want, then click "Change All." This sets that program as the default for all files of that type.

You can change defaults as many times as you want. This is useful if you prefer to edit photos in Photoshop instead of the default photo viewer, or if you want all text files to open in Notepad instead of Word.

Opening files from cloud storage like Google Drive or OneDrive

Files stored in Google Drive, Microsoft OneDrive, Dropbox, or iCloud do not open the same way as files on your hard drive. Instead, they open in your web browser or in the company's dedicated app.

To open a Google Drive file, log into your Google Drive account in your browser, find the file, and click it. Google Docs, Sheets, or Slides will open in a new browser tab. To open a OneDrive file, log into OneDrive.com, find the file, and click it. Microsoft Office will open in your browser.

If you have the desktop app installed (Google Drive for Desktop, OneDrive app, or Dropbox), you can also open files directly from File Explorer or Finder as if they were on your hard drive. The app syncs them to your computer in the background.

What to do when a file will not open

If you double-click a file and nothing happens, or you see an error message, the most common cause is that you do not have the program installed that can read that file type. For example, if you try to open a .psd file (Photoshop format) but do not have Photoshop or a free alternative like GIMP installed, the file will not open.

Check the file extension by looking at the full filename. If you cannot see the extension, enable it in your settings. On Windows, open File Explorer, go to View, and check "File name extensions." On Mac, select the file, go to File menu, choose "Get Info," and look for "Kind."

Once you know the file type, search online for free programs that open that format. For example, if you have a .xlsx file but no Excel, you can open it with Google Sheets, LibreOffice Calc, or Numbers (on Mac). Right-click the file, choose "Open with," and select one of these programs.

File extensions and what they mean

A file extension is the two to four letters after the dot in a filename. It tells your computer what kind of file it is and which program should open it. Here are common extensions you will encounter:

  • .docx — Word document, opens in Microsoft Word, Google Docs, or LibreOffice
  • .xlsx — Excel spreadsheet, opens in Microsoft Excel, Google Sheets, or LibreOffice Calc
  • .pdf — Portable Document Format, opens in any PDF reader including your web browser
  • .jpg or .png — Image files, open in your default photo viewer or any image editor
  • .mp4 or .mov — Video files, open in your default video player
  • .txt — Plain text file, opens in Notepad, Word, or any text editor
  • .zip — Compressed folder, must be extracted before you can access the files inside

If a file has no extension, or an extension your computer does not recognize, it will not open automatically. You can still try right-clicking and choosing "Open with" to pick a program manually.

Frequently Asked Questions

Does opening a file change or delete the original?

No. Opening a file only displays it in a program. The original file stays exactly where it is on your hard drive or in cloud storage. If you make changes and save the file, those changes are written back to the original file. If you open it without saving, the original is not affected.

What is the difference between opening and downloading a file?

Downloading means copying a file from the internet to your computer. Opening means launching a program to view or edit a file that is already on your computer or in cloud storage. You usually read first, then open. Some files, like those in Google Drive, can be opened directly without downloading.

Why does my file open in the wrong program?

Your computer is using the default program you have set for that file type. This happens when you installed a new program and it changed the default without asking. Right-click the file, choose "Open with," select the correct program, and check the box to make it the default next time.

Can I open a file if I do not have the program that created it?

Often yes. Many file types can be opened by multiple programs. A .docx file opens in Word, Google Docs, LibreOffice, and others. Search online for the file extension plus "free viewer" or "free alternative" to find programs you can install. Some file types, like .psd (Photoshop), have fewer options but still have free alternatives.

What does "Open with" mean?

It is a menu option that lets you choose which program opens a file, instead of using the default. Right-click any file and select "Open with" to see a list of programs on your computer that can read that file type. This does not change the default — it only opens that one file in the program you choose.