Run batch file from any location OR from any folder OR from any directory

rdxjam

Distinguished
Aug 18, 2011
1
0
18,510
I have a batch file which is located at say C:\Batches.
I would like to run this batch file from say D:\Works\FolderA.
How to do it... Thanks
 

Stanley L

Distinguished
Aug 18, 2011
1
0
18,510



Append C:\Batches in your environment variable path= and you then can run your batch file from anywhere.
 

MRFS

Distinguished
Dec 13, 2008
1,333
0
19,360
With XP/Pro, .bat files can be stored at:

C:\WINDOWS\system32\


I don't know the comparable pathname under Windows 7,
but I expect that a similar folder exists for all such
Command Prompt commands.


MRFS