Hello,
I have been working on a batch file that will run any shortcut i want. i have a keyboard that has some programable keys i have one folder with all the shortcuts to my programs i am looking for a batch file that i can run and then run any shortcut in that folder. so far my best attepmt is very crude.
@Echo Game 1 Age of Empires III
@Echo Game 2 Dungeon Siege
@Echo Game 3 Dungeon Siege Legends of Aranna
@Echo Game 4 Etherlords II
...
set /p Game=Play?
i have to edit my batch program every time i add or remove shortcuts. pokeing aroudn the net i came up with this bit of code that seems to help but i can not figure out how to use it after it maeks the variables
@echo off
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in ('dir *.lnk /b') do (
set /a n+=1
set v!n!=%%a
)
set v
the bigest problem now seems to be how to get it to list off in numeratical order and how to call the right shortcut. what i am really looking for is a menu that i can then run the corisponding file and all i need ot do to add or subtract items is remove or add the shortcut to the folder the batch file is in. Thank you in advance for the help
Configuration: Windows XP Internet Explorer 7.0
Putting %CD%\ before the path to your programs, and you could use a lot of IF NOT EXIST commands to try and create a makeshift menu..
|
This is the easiest way using a input choice
|
This is what worked for me. It lists all the shortcut files in the folder. You choose an option and the game runs.
|

