Batch file string manipulation
This is a very specific question, however;

Say I have a batch file running from\located in the directory `c:\data\src\branch_1`

How do I set my environment variable `%buildpath%` to `c:\build\bin\branch_1` in a batch file?

(To be extra clear, if the same batch file is located in `c:\foo\bar\branch_2` I want it to set `%buildpath%` to `c:\build\bin\branch_2`)
Batch file string manipulation
===

This is a very specific question, however;

Say I have a batch file running from\located in the directory `c:\data\src\branch_1`

How do I set my environment variable `%buildpath%` to `c:\build\bin\branch_1` in a batch file?

(To be extra clear, if the same batch file is located in `c:\foo\bar\branch_2` I want it to set `%buildpath%` to `c:\build\bin\branch_2`)