If you change your file name convention, then you can easily manage swapping multiple files via RENAME with wildcards.
Instead of calling your files foo_new.dll, call them foo.dll.new.
After the initial swap, the original foo.dll will be called foo.dll.old.
Then you can use:
rem First swap in the new files
rem The following command appends .old to all files with .dll extension (foo.dll -> foo.dll.old)
ren *.dll *?.old
rem The following command removes all .new extensions (foo.dll.new -> foo.dll)
ren *.new *.
rem Now you can work with the new replacements
rem Finally swap out the new files and restore the old ones
rem Add .new to the dll files (foo.dll -> foo.dll.new)
ren *.dll *?.new
rem Remove .old extensions (foo.dll.old -> foo.dll)
ren *.old *.
See How does the Windows RENAME command interpret wildcards? for a complete explanation of how RENAME handles wildcards.
One limitation of the above is it assumes you have a replacement for every .dll file in your directory.
A simple extension using the FOR command can be used to swap a subset of the .dll files (only those for which *.dll.new is defined). It is probably easiest to put the commands in a pair of batch scripts.
Use the following swapInNew.bat batch file to swap in the new files:
@echo off
for %%F in (*.new) do (
move "%%~nF" "~nF.old"
move "%%F" "%%~nF"
)
Now you can work with the replacement files as needed
Finally, Use the following restoreOld.bat batch file to restore the old files:
@echo off
for %%F in (*.old) do (
move "%%~nF" "%%~nF.new"
move "%%F" "%%~nF"
)