If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

To .bat or not to .bat???

Theres not much in life that I enjoy more than programming and delving into the deeper inner sanctums of the internet ........ But there is one thing .......

Efficiency - I love shortcuts (and why wouldn't I)

I have 2 harddrives on my box (C: and D: - named local disk and rural disk respectively)
Almost everything I do goes into my D: drive and the 2 most used directories there are my business directory and my 'pleasure' directory - named 'programming'. Within the programming directory I have many subdirectories aptly named after all the programming languages I use ie. perl, python, java(script), c++, DHTML, xml, php, flash etc. this directory is a few levels down in the D: drive and I like it where it is (the breaking from habit is not immediately conducive to efficiency).

I dual boot windows XP home and unixBSD if Im just working locally I use XP for my passtimes activities and have it set up with many customized keyboard shortcuts - what I want to do is write a program (possibly a batch file - not sure, thus, the starting of this thread) that will pop up a window when I press a predetermined combination of keys, that will allow me to just type in the folder I want to go to and it will take me right there to that directory.

I have alittle experience with batch file writing and what I would like to confirm is: Is writing a batch file the best way to go about this?

I am sure that many will ask questions like: Why would you want to do this? or Why would you dual boot with Win XP? and such
Please don't - to be as congenially honest as possible - Im not looking for my agenda or motivations to be questioned, just looking for a bit of educated and knowledgeable advice.

Thanks to all who submit constructive and useful replies .......... they are all appreciated.

They can steal all my property and belongings, curtail all my rights and privileges, incarcerate me, beat me and even kill me. They then, will only have my dead body, NOT my obedience.

I can't find it right now... braindead... but there is an app you can download that is freeware that allows you to do exactly what you are looking for....

Google will be your friend - however, I tried and it wasn't....

Don\'t SYN us.... We\'ll SYN you..... \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

I am assuming that you wish to monitor for keypresses within windows from the batch file. That can't be done. Batch files are far too limited. You would need to write a program in VB or C++ or something like that which would run as a system service and monitor for these keystrokes.

Batch files aren't good for very much other than shortening very long commands and keeping common sequences of commands in a file to run consecutively. They can do a little more advanced stuff, but nothing like what you need.

Government is like fire - a handy servant, but a dangerous master - George Washington
Government is not reason, it is not eloquence - it is force. - George Washington.

I am sure that many will ask questions like: Why would you want to do this? or Why would you dual boot with Win XP? and such

I don't think so................lots of people here multiple boot, and if anyone questioned why you wanted to do what you are asking, it would imply that they had not bothered to actually read your post..............I thought you explained it quite clearly?

I would agree with Striek that batch files are too crude for what I think you want.

I also recall seeing some software like Tiger~ has, I don't have it, but I will take a look and see if I have more luck.

I do have a question though (purely abject curiosity, and my interest in computing history )

"What made you think of batch files?...........given your knowledge of far more modern and powerful tools"

[H]ard|OCP <--Best hardware/gaming news out there--| pwned.nl <--Gamers will love this one --|
Light a man a fire and you\'ll keep him warm for a day, Light a man ON fire and you\'ll keep him warm the rest of his life.

To answer your question I think it was probably my abject curiosity about something that I didn't know alot about - wanted a project to delve into to get me off my ass and learn more.

Grunt -

ya' know - using 'run' never crossed my mind - I only ever use it for accessing the command line, regedit, and msconfig ........ go figure!!!!!!!!!!
just have to put "d:/" in there and its basically what I wanted anyway.

Nihil and Striek -

Id still be interested in finding out about that freeware app your talking about ....

Thanks guys (gals) .................

They can steal all my property and belongings, curtail all my rights and privileges, incarcerate me, beat me and even kill me. They then, will only have my dead body, NOT my obedience.

In a more general sense: Without having to installing some
keystroke-capture-type software, there is an (freeware) application,
which allows you to launch applications and open folders as you
specify: ActiveLaunch[1]. But it is a so-so solution.

You may also check this page[2]. You can associate a keyboard-shortcut
with a batch-file, which contains

Code:

explorer d:\mydir ...

or calls a small code written by yourself , allowing you to enter the
directory you want to change to. If you want to go with those batch-files
check that page[3], in particular of "choice" (lesson 3).