@echo off
pushd %windir%\inf
if not exist digiwanl md digiwanl
if exist digiasyn.inf move /Y digiasyn.inf digiwanl & echo digiasyn.inf
if exist digiasyn.pnf move /Y digiasyn.pnf digiwanl & echo digiasyn.pnf
if exist digiisdn.inf move /Y digiisdn.inf digiwanl & echo digiisdn.inf
if exist digiisdn.pnf move /Y digiisdn.pnf digiwanl & echo digiisdn.pnf
if exist digimps.inf  move /Y digimps.inf  digiwanl & echo digimps.inf
if exist digimps.pnf  move /Y digimps.pnf  digiwanl & echo digimps.pnf
if exist digippp.inf  move /Y digippp.inf  digiwanl & echo digippp.inf
if exist digippp.pnf  move /Y digippp.pnf  digiwanl & echo digippp.pnf
if exist digipvc.inf  move /Y digipvc.inf  digiwanl & echo digipvc.inf
if exist digipvc.pnf  move /Y digipvc.pnf  digiwanl & echo digipvc.pnf
if exist digisna.inf  move /Y digisna.inf  digiwanl & echo digisna.inf
if exist digisna.pnf  move /Y digisna.pnf  digiwanl & echo digisna.pnf
if exist digisvc.inf  move /Y digisvc.inf  digiwanl & echo digisvc.inf
if exist digisvc.pnf  move /Y digisvc.pnf  digiwanl & echo digisvc.pnf
if exist mdmdgden.inf move /Y mdmdgden.inf digiwanl & echo mdmdgden.inf
if exist mdmdgden.pnf move /Y mdmdgden.pnf digiwanl & echo mdmdgden.pnf
if exist netdgdxb.inf move /Y netdgdxb.inf digiwanl & echo netdgdxb.inf
if exist netdgdxb.pnf move /Y netdgdxb.pnf digiwanl & echo netdgdxb.pnf
if exist netmap.inf   move /Y netmap.inf   digiwanl & echo netmap.inf
if exist netmap.pnf   move /Y netmap.pnf   digiwanl & echo netmap.pnf
if not exist digiax md digiax
if exist dgaxasyn.inf move /Y dgaxasyn.inf digiax & echo dgaxasyn.inf
if exist dgaxasyn.pnf move /Y dgaxasyn.pnf digiax & echo dgaxasyn.pnf
if exist dgaxmps.inf  move /Y dgaxmps.inf  digiax & echo dgaxmps.inf
if exist dgaxmps.pnf  move /Y dgaxmps.pnf  digiax & echo dgaxmps.pnf
if exist mdmdgax.inf  move /Y mdmdgax.inf  digiax & echo mdmdgax.inf
if exist mdmdgax.pnf  move /Y mdmdgax.pnf  digiax & echo mdmdgax.pnf

for %%i in (oem*.inf) do call :MoveWanlinksOems %%~ni
for %%i in (oem*.inf) do call :MoveSplitDriverOems %%~ni
popd
goto :EOF

:MoveWanlinksOems
findstr /M CatalogFile=netdgdxb.cat %1.inf
if (%ERRORLEVEL%) == (0) move /Y %1.inf digiwanl & echo %1.inf
if (%ERRORLEVEL%) == (0) if exist %1.pnf move /Y %1.pnf digiwanl & echo %1.pnf
goto :EOF

:MoveSplitDriverOems
findstr /M CatalogFile=dgaxmps.cat %1.inf
if (%ERRORLEVEL%) == (0) move /Y %1.inf digiax & echo %1.inf
if (%ERRORLEVEL%) == (0) if exist %1.pnf move /Y %1.pnf digiax & echo %1.pnf
goto :EOF

