Make copy folder functionality a bit more generic.