1
How could I assign a hotkey of my choice to start c:\cygwin\cygwin.bat ?
Similarly, but a bit more difficult, how could I start c:\dir1#VAR#\dir2\test.bat, where #VAR# is the name of a directory that varies, and the last (in alphabetical order) of all #VAR# should be chosen ?
So just to be clear, if c:\dir1\A\dir2\test.bat and c:\dir1\B\dir2\test.bat exist, the console that should be opened when the hotkey is pressed is: c:\dir1\B\dir2\test.bat.
Thanks
Thank you very much, it works like a charm, and I wouldn't have been able to produce such a batch script. Could you please explain how it works, especially the 'for' line ? – Car981 – 2013-04-03T15:12:31.983
For line enumerates all subdirectories in the current directory, which was set by CD command.So, "b" local variable will get the name of the last directory. Assuming that NTFS always sorts items by name, you will get exactly what you want. – Maximus – 2013-04-03T15:56:10.293
Is there a way to assign a shortcut to open a task that is defined already? I mean, suppose I already have c:\dir1\runner.bat assigned to task 3, I want a shortcut that opens task 3 so I don't have to repeat myself. – stijn – 2013-07-18T07:25:27.937
1Call shell with task name in curly brackets. – Maximus – 2013-07-18T10:41:57.670