Pin Any File or Folder to the Taskbar in Windows 10

Windows 8 and Windows 10 lets you pin folders to the Start screen, but pinning data files and folders to the taskbar is not allowed. The context menu entry Pin to Taskbar never exists for data files and folders. However, here is a neat little trick that lets you pin any file or folder (directory) to the taskbar.

Pin Any File or Folder to the Taskbar

  1. First, configure Windows to show the extension of known file types. To do so, open File Explorer, click File menu and select Change folder and search options. In the Folder Options dialog, select the View tab, and uncheck Hide extensions for known file types setting if it’s already enabled.
  2. hide extensions for known file types - folder options

  3. pin data file or folder to taskbarChange the extension (to .exe) of the data file you want to pin to taskbar. Let’s say you have a text file named Notes.txt. Rename that to Notes.exe. You’ll see the following message when renaming the file. Click Yes when you see the prompt “Are you sure you want to change it?”.
  4. Right-click on the file Notes.exe and choose Pin to Taskbar.
  5. Then change the extension of the file back to original (.txt). Alternately, you can right-click on an empty area on the folder where the file resides, and click Undo Rename option.
  6. Press and hold the Shift key, and right-click on the pinned icon on the taskbar and click Properties.
  7. In the Properties dialog that opens, change the file extension in the shortcut’s Target field, so that it points to the original file (Notes.txt).
  8. shortcut properties change target

  9. Additionally, make sure you customize the icon as it’s showing an unknown or generic icon right now. To set the correct icon, click Change icon and select an icon from the list. If you don’t like the stock icons from shell32.dll, try imageres.dll or browse to locate the related application to pick suitable icon.
  10. Once done, click OK and OK to close the dialogs.

The taskbar icon won’t be refreshed unless you restart the explorer shell, or sign out of your user account and sign back in.

pin data file or folder to taskbarHowever, one downside of this method is that when you click on the pinned taskbar item, a new icon for the executable will show up on the taskbar and there is nothing that can be done about it.

The same method can be used to pin any folder. To pin folders, another option would be to create a folder shortcut with explorer.exe prefix. But everytime you click on it, it spawns a new explorer.exe process that doesn’t exit when the folder is closed. Whereas the above method won’t create extra explorer.exe instances.

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

Leave a Comment