Connecting Tech Pros Worldwide Forums | Help | Site Map

How would you go about creating a heap of shortcuts to a batch file?

googleboy
Guest
 
Posts: n/a
#1: Sep 17 '06
I need to create about 2000 shortcuts to a batch file. The shortcuts
need to have:

Name: %parameter%.lnk

Target: n:\Path\To\batchfile.bat %parameter%
Start In: n:\Path\To\


Where the parameter is filled in by reading in a file with all the
shortcut names.


Extra bonus points for being able to apply the icon for an application
at n:\path\to\application\app.exe

At the moment I am looking like having to do this with VB, but I am
trying hard to leave that behind for evermore.

TIA

googleboy




Tim Golden
Guest
 
Posts: n/a
#2: Sep 17 '06

re: How would you go about creating a heap of shortcuts to a batch file?


googleboy wrote:
Quote:
I need to create about 2000 shortcuts to a batch file.
The shortcuts need to have ...
You need to use the win32com.shell module from pywin32 extensions.
If you search the archives of this group and/or the python-win32
mailing list, you should find several explanations. The best search
term is probably IID_IShellLink.

I've got a Mickey-Mouse module which wraps it and other things here:

http://timgolden.me.uk/python/winshell.html

TJG

Closed Thread