@echo off SETLOCAL EnableDelayedExpansion REM Obj import template copier REM Copies and renames the default rfa file to all obj files in the folder. REM Current revit file is for revit 2016 update it for later revit versions first REM Created by Peter Gyetvai: gyetpet@gmail.com REM --------- REM VARIABLES REM --------- SET FILEEXT=OBJ SET TEMPLATEFILENAME=obj-empty2016 REM ----------------------- REM Beginning of the script REM ----------------------- for /R "%~dp0" %%f in (*.%FILEEXT%) do ( echo processing: %%f copy "%~dp0\%TEMPLATEFILENAME%.rfa" "%~dp0%%~nf.rfa" echo "%~dp0%%~nf.rfa">> "%~dp0filelist.txt" ) REM ----------------- REM End of the script REM -----------------