Page 1 of 1

Change the Directory from system32 to an different folder

Posted: 10 Aug 2011 16:49
by DjTranceSoldier
Hey guys (:

Well, i'm pretty new at scripting with .bat files, and i think i have a really easy question for you... :D

Following Problem:
I want to create a nice looking Program with some functions. But that File needs some other files for running...
If i open that batch file, i cn see at the title the path: C:\windows\system32 , but I need it to be the path to the folder all those file are included...
And i can't work with cd %temp% and cd.. etc., cause every guy will put this folder in a different directiory...
I used If NOT EXIST etc., maybe there's another way?
I just want to check, if those files are there....
And can I chang the way that If cmd will check? So maybe i can put those required files in a diffent folder? (:
Please help me, i need this cmd :D

And it would be nice if there will be an explanation of the cmd, cause i want to learn it ;D
Thanks (:

Re: Change the Directory from system32 to an different folde

Posted: 10 Aug 2011 18:02
by Ed Dyreen
'

Code: Select all

@echo off
echo.$Path: '%~dp0'
echo.$File: '%~f0'
pause
for /? |more
pause
exit /b
or

Code: Select all

@echo off
echo.active path:
cd
pause
exit /b