# joy_copyfile

## What it is for
`joy_copyfile.bat` copies a finished BSP to another directory after compilation.

This is useful when you:
- build maps in a **clean Kingpin install**
- but actually **play and test** them in another main install

Instead of manually copying the final BSP after every build, this batch file lets the compile stack do it automatically.
This is helpful if your working-on-maps Kingpin installation is different from your playing Kingpin installation.

## Typical use
Place this tool **at the bottom of your compile stack**, after the final BSP has already been generated.

## TrenchBroom setup
Add a **Run Tool** in TrenchBroom:

- **Tool Path:** path to `joy_copyfile.bat`
- **Parameters:**

```text
"C:\games\kingpin-newmaps\main\maps\${MAP_BASE_NAME}.bsp" ${GAME_DIR_PATH}\main\maps\${MAP_BASE_NAME}.bsp
```

The exact parameter order should match the working compile stack you already use.

## Usage
```bat
joy_copyfile.bat <path1> <path2>
```

## What it does
The batch file takes two file paths and performs an overwrite copy.

Internally it uses:

```bat
copy /Y "%~1" "%~2"
```

So the destination file will be overwritten if it already exists.

## Example
```bat
joy_copyfile.bat "C:\games\kingpin-newmaps\main\maps\mymap.bsp" "C:\games\kingpin\main\maps\mymap.bsp"
```

## Notes
- This tool is intended for Windows.
- It is simplest as a compile-stack utility rather than a general-purpose copy helper.
- Make sure both paths point to `.bsp` files in your final setup.
