bat files explained... using a bat file is just like typing a bunch of stuff into the command prompt...

what is the command prompt?
it's not just a legacy command line interface
it is integrated into the windows api itself whenever application developers implicitly use its functions

the user's hard drives are mappped to the driveletters C:\
the cd-rom drive would have, in the past, been D:\

these driveletters are the top level locations for directory paths

a directory path is something like C:\music\blues\
technically, C:\music\blues\ and C:\music\blues have a different meaning
without the \ at the end, c:\music\blues refers specifically to the directory itself
c:\music\blues\ refers to the contents of the c:\music\blues directory

in this case, the music folder or directory lives on C:\ and contains another folder or directory named blues.

sometimes there are network paths or different aliased paths which dont really exist... ignoring network paths for now, lets talk about aliased paths as well as "Windows Explorer"

"Windows Explorer" is something different from internet explorer... although oftentimes these programs might be set by default to invoke the other one...

these two microsoft programs share a similar user interface... one thing to notice is the bar where you can enter text.... in internet explorer the text you enter here is a URL or a uniform resource locator... in windows explorer the text that you can enter into the bar is a windows command or location

we typically think that the "location bar" on windows explorer is used to type in locations... and many users in fact do not use it at all... preferring to navigate using the Up Directory button and graphical icons for files and folders.  anyways, i had said that you can enter commands into the windows bar.

on some level this is true but on the flipside it is not always true.

you can enter C:\windows\system32\notepad.exe C:\windows\system32\notepad.exe
into the wexplorerbar and it will open notepad.exe within notepad.exe
you can enter [explorer.exe .]
into the location bar and it will cause a new explorer window to open targeting C:\Windows\System32
and you can try typing something like "cmd start" into the bar
but it won't start a cmd.exe which starts a new cmd.exe

so at this point you realize that you cant just create shortcuts to cmd.exe passing it the commands you want to execute... you have to run bat files... you could for instance run bat files like go5.bat from the location bar itself to navigate to directories... here is a description of the process of creating the bat file.

c:\
dir /ad w*
looks like there could be some new directories here
mkdir ww
cd ww
c:\ww\
dir
0 files 2 dirs . ..
path
{} C:\python2714; is in paths
cd /d c:\python2714\
notepad d.bat
{}cmd /k c:\windows\explorer.exe c:\ahk\
{}save file
exit
{}type d.bat into a wexplorer location bar and enter
]] cmd shows up and looks like this, and additionally a wexplorer window shows up with c:\ahk\


Comments