@echo off cls ECHO Operations in progress ECHO . SETLOCAL ENABLEDELAYEDEXPANSION set results=c: set file=png md %results%\results for /r %CD% %%x in (*.%file%) do ( set w= set w=!w!%%x set z= set z=!z!%%x call set z=!z:\=-! call set z=!z::=! call set z=!z:runtime= ! call set z=!z:*libraries= ! echo @echo on > %cd%\copy.bat echo copy "!w!" "%results%\results\!z!" >> %cd%\copy.bat echo @echo off >> %cd%\copy.bat call %CD%\copy.bat >>%CD%\log.txt DEL copy.bat) ECHO . ECHO Operations Complete... ECHO view log.txt in this folder for more info... ECHO . PAUSE