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
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.
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.
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.
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.
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!
Download (right-click, Save-As) (Duration: 4:09 — 4.4MB)
Subscribe: Apple Podcasts | RSS
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.
16 comments on “Why Is the Same File in Two or More Places on My Machine?”
You didn’t mention libraries. How do they fit into this scheme?
They;re a confusing way to essentially do the same thing. Yes, libraries (which I understand are being deprecated) are an example of files appearing in more than one place. Just What Are Windows 7’s “Libraries” and How Do They Work?
I’ve always turned of showing Libraries in File Explorer. I like to go directly to the folders and know exactly where everything is.
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.
[ 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! :(
Libraries can be turned off.
In Windows File Explorer, click on the “View” tab.
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.
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!
That’s easy, back up to external drives and use a cloud sync solution like OneDrive, Dropbox, Carbonite or Backblaze.
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.
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.
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. :-)
So if I’m scanning for duplicates and it shows for example a jpeg in 3 different paths they could all be the same jpeg file so you can’t really rely on duplicate finder to remove duplicates because you’d likely remove that particular jpeg from all 3 paths?
Not all three, but you could delete random two — how will you know they’re the copies you don’t need in locations you don’t use? Or that perhaps you’ll delete the copy you DO use in the location that matters to you?
It’s certainly possible to do this, but it take much more than just running the tool — you have to be able to identify the copies you want.
Further to the above, in a paper office system you have file cabinets arranged alphabetically. so if you have a file called “A”jpeg it would exist in a folder in a file cabinet. You do not want to have too many file cabinets so there would not be a cabinet called shortcuts you would open to find a file telling you to go look in the cabinet where the actual file is, or another file drawer/cabinet called photos telling you to go to the file cabinet where the actual file is; ad infinitum till you had to buy more office space for your cabinets…something is seriously wrong with a file system setup in this manner. In effect you are using up storage space on your drive for no good reason.
I looked at a shortcut .lnk file and it is 71 bits long. I have 1535 shortcut files on my computer for a grand total of less than 110,000 bytes. That’s insignificant. I have dozens of .docx files, each taking up more space than all of my combined shortcuts. I could put my shortcut files almost 14 times on a floppy.
Files and folders can be removed from the Quick Access folder by right clicking on the file or folder in it and selecting from the menu options, “remove from Quick Access” (Windows 10). If everything is removed from the Quick Access folder and the other duplicative locations similarly, can the Quick Access and other location folders be deleted so no more files are put in them or will that cause the Windows Operating System to malfunction? I would prefer an additional floating taskbar that would hold the shortcuts to the files I want to access the most often and which could be changed as the situation called for and could be hidden or put away in a folder if not needed. I would also prefer to back up all my documents and programs to an external hard drive which also simultaneously backup those same files to One Drive if I wanted or not backup to One Drive if I didn’t want to store files on One Drive. I just want the Start Menu, Desk Top, and taskbars where I could have access to the shortcuts to my program and document files and get rid of the Libraries and Quick Access folders as long as it doesn’t cause the operating system to malfunction. Perhaps the question is why did Microsoft add these duplicative folders to the system. I certainly agree that the file system seems seriously flawed. Keep it simple and get rid of the superfluous and duplicative extras so it’s easier to understand what’s really being deleted and what’s really necessary. I too lost files deleting them from these strange folders thinking that someone had hacked my computer because I knew I hadn’t put the files there. When I get a chance I think I’ll take a community college class on how to use the Windows Operating System.