Solved Batch directory finder :)

September 20, 2012 at 00:33:24
Specs: Windows Vista
Hey guys me again ^~^ this time im trying to make a batch program
that find out what directory the batch file is in
for example the batch file has to be in a folder called "game" but i need to be able to get the batch file to findout where the folder called "game" is so that it can open another batch file
(which will be located within the same folder)


thanks for any input :)
oh and btw there aren't any ways of changing the colors of text in a batch file are there?
(i mean half the screen red and the other half green or something)

Domo!


See More: Batch directory finder :)

Report •


✔ Best Answer
September 23, 2012 at 20:01:48
oh wait no nvm lol stupid me, i can just do
set /p hi=<%cd%\saves\Troll!!
echo %hi%

or

start %cd%\otherbatchfile

sorry for wasting your time, i should have checked earlier :(
thanks anyway for your replies

Domo!



#1
September 20, 2012 at 02:29:43
:: ===== script starts here ===============
::
:: chue.bat 2012-09-20 16:23:38.81
@echo off > newfile & setLocal enableDELAYedeXpansioN

for /f "tokens=* delims= " %%a in ('dir/b/s/ad \ ^| find /i "games"') do (
echo %%a
)
goto :eof

:sub1
for /f "tokens=* delims= " %%i in ('') do (

)
goto :eof
::====== script ends here =================


====================================
Life is too important to be taken seriously.

M2


Report •

#2
September 20, 2012 at 17:13:34
For color, maybe, consult: color /?

Report •

#3
September 20, 2012 at 22:16:55
what ? it didnt work?

Domo!


Report •

Related Solutions

#4
September 21, 2012 at 18:53:51
Add the following to the first batch file executed:
CD /D "%~dp0"

The first batch file executed should be able execute any other batch files in the directory.

When your only tool is a hammer, every problem looks like a nail.


Report •

#5
September 23, 2012 at 20:01:48
✔ Best Answer
oh wait no nvm lol stupid me, i can just do
set /p hi=<%cd%\saves\Troll!!
echo %hi%

or

start %cd%\otherbatchfile

sorry for wasting your time, i should have checked earlier :(
thanks anyway for your replies

Domo!


Report •

Ask Question