Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
(Query: unique to that folder, or the same for all 652 files?)
@echo offset repfile=%~1echo Replacement file: %repfile%for /f "delims=" %%F in (' dir /b ^| find /v "%repfile%" ^| find /v "MakeAllSameAs.bat" ' ) do ( Echo Replacing %%F del "%%F" copy "%repfile%" "%%F" )
Suppose you call this file MakeAllSameAs.bat and place it in a folder containing the files to be altered and the file to be copied to each open a command window in that folder and type its name followed by the name of the file to be copied e.g.MakeAllSameAs "small_new"Code: [Select]@echo offset repfile=%~1echo Replacement file: %repfile%for /f "delims=" %%F in (' dir /b ^| find /v "%repfile%" ^| find /v "MakeAllSameAs.bat" ' ) do ( Echo Replacing %%F del "%%F" copy "%repfile%" "%%F" )
for .... ( dir /b .. | findstr /v /c:string1 /c:string2 ) do (... )