I'd like to run this batch file (setenv.cmd) when I right click on any folder:
@echo off
SET CPLUS_INCLUDE_PATH=C:\mingw32\include;C:\mingw32\lib\gcc\mingw32\4.9.2\include;
SET PATH=%PATH%;C:\Archivos de programa\7-Zip;C:\Archivos de programa\WinRAR;C:\usr\bin;C:\msys\1.0\bin;C:\gtk2\bin
SET PKG_CONFIG_PATH=C:\gtk2\lib\pkgconfig;C:\usr\lib\pkgconfig
@echo on
I setuped my registry from this page, with the "prompt here". My question is how to open the console window from the selected directory and run my batch file?
Use
&
. On Windows 8.1:Note that all inner
"
double quotes and\
reverse slashes in the data are escaped with a\
backslash. In fact, data are as follows:Edit:
cmd.exe /s /k pushd "%V"&call "D:\full\path\to\setenv.cmd"
should suffice. An additional (trailing)"%V"
is merely a remainder residue of my debugging practice (@echo %1
in the batch to ensure it works).Resources (required reading):
&
special page) Redirection