bat file

Hello
How can I find the windows dir in a *.bat file(from dos) so I can run a file?
ILPowerSoftAsked:
Who is Participating?
 
simonetConnect With a Mentor Commented:
Use the %windir% variable.

Here's an example:

dir %windir%

start %windir%\notepad.exe


if %windir% hsa not been set, then try %winbootdir%. These variables are usually automatically set by Windows at start up.

Yours,

Alex
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.