If you’re like most people, you probably have a few folders on your computer. But if you’re like me, you also have a few files that look like they’re in multiple folders. This is because when you open a file in one of your folders, the file opens in the default folder for that program. But if you open a file in another folder, the file opens in a different folder with its own set of files and folders. To make your files appear to be in multiple folders at the same time, follow these steps:
- Open File Explorer and create a new folder called “Multiple Folders.” This will contain all of your new files and folders.
- In File Explorer, click on the “Folder Options” button and select the “Multiple Folders” check box. This will make sure that all of your new files and folders are stored in one place so that they look like they’re part of one big file.
- Click on the “New Folder” button and name your newfolder “Multiple Folders.” Now all of your new files and folders will be stored inside this newfolder!
If you have a high number of folders set up for your work and need to use the same script file in all of them during the work day, then what is the easiest way to accomplish that beyond a lot of copying and pasting? Today’s SuperUser Q&A post has some helpful answers and advice for a frustrated reader.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
Screenshot courtesy of csaveanu (Flickr).
The Question
SuperUser reader Elliot is looking for the best way to have the same file appear to be in multiple folders at the same time:
Is there a way to do this rather than copying and pasting the script file one folder at a time?
I need the script to appear as if it is in each folder while actually being in only one place so that I can edit it once, then when it is run from any of these locations have the folder path be correct. The alternative is editing the master and then pasting it one folder at a time through all 50+ folders every time I update the code, which is very tedious and error prone. On Linux, I could set this up with a symbolic link, but I cannot figure out a way to do this with Windows.
Alternatively, a way to paste the file into all the target directories at once, instead of one at a time, would accomplish the same goal.
The Answer
SuperUser contributor gronostaj has the answer for us:
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
Symbolic Links (or Symlinks for short) are quite similar to shortcuts: there is one actual file and multiple references (Symlinks) to it. They even have that little arrow on the icons. Unlike shortcuts, Symlinks can have any extension.
Hard Links bind a file on a hard drive to a location in the directory tree. Each file has at least one Hard Link, otherwise it would not exist in any directory. If a file has multiple Hard Links, the original one cannot be distinguished from the others and the file physically exists in only one location.
Both Have Their Limitations:
Some software does not play nicely with Symlinks. Deleting the original file leaves all of its Symlinks broken. You cannot Hard Link folders (but you can create a Directory Junction if a Symlink is not enough). Creating cross-partition Hard Links is impossible.
Symlinks are usually sufficient.
To Create a Symlink or a Hard Link:
Launch a privileged command line: Press the Windows Key, type cmd, then press Ctrl+Shift+Enter.
Issue the mklink command:
mklink link_name link_target for a file Symlink mklink /d link_name link_target for a folder Symlink mklink /h link_name link_target for a file Hard Link mklink /j link_name link_target for a Directory Junction