Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why Is the Same File in Two or More Places on My Machine?

You delete what you think is a duplicate copy of a file over here, only to find that the original over there disappeared as well.

What you’re seeing is not a duplicate copy of a file, but rather the same file appearing in more than one place. It’s common, particularly as Windows tries to “help” you locate and manage your documents.

I’ll review some of the ways it “helps”.

Become a Patron of Ask Leo! and go ad-free!

One file, three places

A Single File Appearing in Three Places
A single file appearing in three places. (Click for larger image.)

The image above shows three Windows File Explorer windows, each open on a different location:

  • Quick access -> Documents
  • This PC -> Documents
  • This PC -> C:\Users\LeoN\Documents

As you can see, they all show the same thing: a folder (“Remote Assistance Logs”) and a text file (“A Document of Some Sort.txt”).

If I were to delete the text file in any of the three, it would disappear from all three.

There’s only one file. Windows is just showing it to you three different ways.

Files and file listings

A file is nothing more than a collection of data somewhere on the disk.

A directory listing, or a listing of files in a tool like Windows File Explorer, simply points to the file.

Multiple Directory Listings Pointing to the Same File
Multiple directory listings pointing to the same file. (Click for larger image.)

It’s perfectly valid to have more than one pointer to the file. That means that the file — even though there is only a single instance of the file — could appear in different directory listings in different folders.

Shortcuts

There are several different ways1 the concept is implemented, but the most common is called a shortcut. It’s a special kind of file itself that says the equivalent of “the file you want is really over there”, pointing to the actual file.

In the Windows File Explorer example at the beginning of this article:

  • Quick access -> Documents is a shortcut to the folder C:\Users\LeoN\Documents.
  • This PC -> Documents is a shortcut to the folder C:\Users\LeoN\Documents.
  • This PC -> C:\Users\LeoN\Documents is the “real” folder.

So even though they look like different locations, in reality they all point to, or are, a single location. That means anything you place in that single location will appear as if it were in each of the three.

How do you know what you have?

It’s surprisingly difficult to know if you’re looking a single file or a duplicate. I tend to take the pragmatic approach, and either:

  • Delete it in Windows File Explorer, and see what happens; if all copies go away, I restore it from the Recycle Bin.
  • Rename it, and see if all the filenames change.
  • Change the file in some way to see if all change.

In the case of a shortcut, you can right-click on the item, click Properties, and see where the target of the item is, or where the item itself is located.

Unfortunately, though, that doesn’t really help if the shortcut points to a folder, like Documents. The items within that folder won’t have any knowledge or information about shortcuts.

System folders

I mention shortcuts because you can create them yourself, and how they work is common and fairly obvious. It’s also the most common source of confusion.

System folders — like “This PC -> Documents” — are technically not exactly shortcuts, but something different managed by the system. The important thing is that for our purposes of clearing up the confusion of finding the same file in more than once place, they act very much like shortcuts.

If you found this article helpful, I'm sure you'll also love Confident Computing! My weekly email newsletter is full of articles that help you solve problems, stay safe, and give you more confidence with technology. Subscribe now and I'll see you there soon,

Leo

Podcast audio

Play

Video Narration

Footnotes & References

1: For the techies who are wondering, aside from the implications in the block diagram I’m explicitly side-stepping the fact that the NTFS file system supports “hard links”. Usage is rare and not generally a concern for the average user.

11 comments on “Why Is the Same File in Two or More Places on My Machine?”

  1. Hi, thanks for the explanation; I have found this a curse in my opinion – would rather have one copy and back it up myself, say, in One Drive or to an external hard disk. It took me a long time to get used to Win 7 when this annoying aspect first appeared! Guess I’m used to it now and have moved on to Win 10.

    Reply
  2. [ I have 64-bit Windows 7Home Premium. ]

    Leo, you wrote:

    “…libraries (which I understand are being deprecated)…”

    Well, praise God for small favors (and for favors not so small)! Hallelujah!

    I never use ’em, but I’m constantly being confused by them. Good riddance to some bad rubbish! 🙁

    Reply
    • Libraries can be turned off.
      In Windows File Explorer, click on the “View” tab.
      Click “Options”.
      In the “Options” menu, click the “View” tab (that’s a different view tab from the other one).
      Uncheck the box which says “Show libraries”.
      While you’re at it, make sure “Hide extensions for known file types” is unchecked (unrelated to Libraries but an essential setting)

      You might want to look for any other options which will improve your experience.

      Reply
      • But is there any way to actually protect important files from accidental deletion? With devices synced and these organizing file confusions, I am guilty of deleting my family’s four-generation photo collection and a master’s thesis, and by the time I realized what had happened, it was too late. Just gone. What I do now is keep way too many copies with slightly different filenames–even more confusion!

        Reply
  3. Now I’m confused. To me, a shortcut is precisely something that you can delete without the designated file being deleted.

    The other, system things you describe are, what ?… hardlinks ?… I never really understood the concept.

    Reply
    • As I understand it they are shortcuts to locations rather than actual data files. So you can delete the shortcut to the location but you are not deleting the data in the location itself.

      I’m sure Leo or Mark will correct that if I am wrong.

      Reply
    • It is confusing. There are shortcuts (implemented as files with special information that says “the file is really over there”), hard links (implemented as multiple directory entries that reference the same file on sidks), symbolic links (kind of like a shortcut, implemented as a directory entry), and even others. That’s one of the reasons my “how to tell” instructions don’t have you try to figure any of that out — just change the file and see if it changes in both places. 🙂

      Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.