@echo off
IF EXIST "%~dp0Skins" ren "%~dp0Skins" Skins.BAK
DIR "%~dp0files" /A-D /B /ON > "%~dp0cpio_contents.txt"
CD "%~dp0files"
"%~dp0cpio\cpio.exe" -ov < "%~dp0cpio_contents.txt" > "%~dp0Skins"
DEL "%~dp0cpio_contents.txt"