From batch file, calling another batch file different folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
cylis
Posts: 1
Joined: 02 Mar 2011 11:51

From batch file, calling another batch file different folder

#1 Post by cylis » 02 Mar 2011 11:57

As the title states, I am trying to call a batch file within a batch file but from a different folder that the starting batch file was in. So for example,

Test Folder 1
Test Folder 2

I have test.bat in Folder 1, and I want to run the test.bat in folder 1 to be able to call another .bat file from Test Folder 2.

Not even sure this is possible, I am fairly new to this :oops:

Tried doing some research on it but was unsuccessful.

Thank you. :)

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: From batch file, calling another batch file different fo

#2 Post by aGerman » 02 Mar 2011 12:24

Use the CALL command in connection with the entire path (or relative path).

Code: Select all

call "C:\somewhere\Test Folder 2\test.bat"

Regards
aGerman

Post Reply