Inluding other Batch files within EXE.

Convert your BATch files into EXEcutable format in one click.
Post Reply
Posts: 1
Joined: Sun Feb 22, 2009 1:04 am

Inluding other Batch files within EXE.

Post by TEST9996 »

Hi, I have a batch file that works, and connects too 3 other batch files.
It is done by the Choice command, which links to a file that deletes temp files etc.

Could i put my main batch file (Thats used to open and run them) as the exe and include the other 3 into the same exe, with it still working as if they were 3 seperate batch files?

I use , both the "CALL" command And the "CD /D C:\Program Files" commands, to link to the other batch files, and other files on my computer.

If it would work, how do i go about using the %MYFILES% enviroment, which i guess is used to link them?

Especially when one batch file is run by using CD /D Program files... etc and the Other 2 by using the CALL command?

Thanks for your time.
Site Admin
Posts: 428
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

Yes, you can.
You will need to use %MYFILES% variable to get the path to included files,
for example:

CALL %MYFILES%\included.bat
Post Reply