1

How do you get a file opened by a batch file pinned to the taskbar?

In XP you could just drag your batch file onto the quicklaunch section of the taskbar, then any file you drop on that icon would be opened with that batch file.

In windows 7 you can get a batch file there using various methods, and you can open a file with a pinned application by shift dragging onto it, but this doesn't work for batch files.

related article: How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu?

daniel
  • 819

1 Answers1

3

I don't know about pinned items, but you may be able to have the same effect with toolbars on the task bar

1) Set up your batch file in a folder. Call it what you want, for my example, my folder is called Batch Files and my batch script is called test (all it does is open cmd.exe at the moment)

2) Right Click on the taskbar, select Toolbars->Add toobar

3) Navigate to the Batch Files folder and hit 'Select Folder'

4) Unlock your taskbar (right click, unlock taskbar) and drag the toolbar to where you want it.

(NOTE: Whilst here, you can also right click the drag-area on the toolbar and change some settings like whether to display folder name, file names etc)

5) Try dopping a file onto the test batch file. The batch file should run (and displays cmd.exe in my case)

Hope this helps

PS: you can have nested folders/files as well, in case you want to have links to different things.

PPS: I usually create the folder in the root C:\ directory, but again you can create it anywhere

EDIT: This walkthrough has pictures as well, just scroll down to 'Creating a Toobar' section:

http://www.homeandlearn.co.uk/bc/win7/toolbars.html

Robotnik
  • 2,645