Windows 11 does not allow you to pin a drive, folder, or file to the taskbar.
However, you can pin them with the steps in this post. Please see them below.
Pin Drive, File or Folder on the Taskbar in Windows 11
If you want to pin a drive, folder, or file (such as excel or batch) to the taskbar, follow these steps:
Right-click on the one you want to pin.
Hit Show more options and click on “Create shortcut.” If you’re creating a shortcut for a drive, you’ll see a popup in which you need to hit “Yes.”
You can now see the shortcut. If you’ve created a shortcut for a drive, you can find it on the desktop.
Right-click on the shortcut and select “Properties.”
Type explorer at the beginning of the “Target” field and press the “Space bar” key.
Click “OK” at the bottom.
Right-click the shortcut and select “Pin to taskbar.”
You can remove the shortcut you’ve created in the steps above if you wish. Note that the one you pinned on the taskbar works fine even after that.
If you want to unpin from the taskbar, right-click on the one you want to unpin. Select the “Unpin from taskbar” option, and that’s it.
Dragging and dropping the folder into the taskbar blank area will pin it into its File Explorer shortcut’s “Pinned” section.
If the File Explorer shortcut is not in the taskbar when you’re doing the above step, Windows 11 will create a shortcut for File Explorer, and the folder will be in its Pinned section.
I hope this guide, “How to Pin a Folder or File on the Windows 11 Taskbar,” is helpful to you.
Thanks for reading.