|Hi Guys, I’m trying to do a simple comparison between a variable that read-in from a text file against my text. This is where I’m trying to rename the existing dlls with the time and date before my ‘Auto patch.bat’ replace with the new ones, just in case if I want to roll back during testing. Any ideas would be highly appreciated. |
The problem is it’s not setting the ‘ dll’ to %%A in order for me to do the comparison. It worked without the for loop. But I want to rename multiple dlls. Please point me to my mistake or feel free to suggest me a different approach.
@echo OFF & setLocal EnableDelayedExpansion
echo %date% %time%
for /f "tokens=2 delims= " %%A in (C:\Hotfix\filelist.txt) do (
if "%dll:~0,2%"==PB (
RENAME "C:\Pebble Beach Systems\Neptune 22.214.171.124\Tasks\%%b.dll" %%b.dll_"%TIMESTAMP%"
echo Rename dlls. Ready for patching.