We have an updated license stored in the file 'style.mfx'. We want to send to user and have it silently replace the old file by that name. The File will always be in c:. I've tried this demo with no luck. I want to hard code targetName and replacementFile in the batch file.
@echo off
set targetName=%~NX1
set replacementFile=%~F2
call :processFolder
goto :EOF
:processFolder
rem For each folder in this level
for /D %%a in (*) do (
rem Enter into it, process it and go back to original
cd %%a
if exist "%targetName%" (
copy "%replacementFile%" "%targetName%" /Y
)
call :processFolder
cd ..
)
exit /B
cmd line isn't even working! but I want the arguments in the batch file...
app teststyle.mfx c:\teststyle.mfx
c:\Users\Joseph\Desktop>replace.bat teststyle.mfx c:\teststyle.mfx
c:\Users\Joseph\Desktop>
Any help would be appreciated.