Ok this is what i ended with. it works and all. thank you foxidrive
bet you can clean it up a bit. but remember i need to be mobile. As i use a usb hard drive. thank you
I also want to add some more logging to this script. too.
==================================================
@rem logonwallpaper.bat
@ECHO OFF
@SETLOCAL ENABLEEXTENSIONS
@cd /d "%~dp0"
DEL ERROR.LOG
>>"%~dp0\error.log" 2>&1 echo -------------------------begining of batch script-------------------------
>>"%~dp0\error.log" 2>&1 echo. ==========================================================================
>>"%~dp0\error.log" 2>&1 echo started SWF GAME HTML script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%.
>>"%~dp0\error.log" 2>&1 echo. ==========================================================================
echo -------------------------begining of batch script-------------------------
echo ==========================================================================
echo started SWF GAME HTML script year%date:~-4,4%,day%date:~-7,2%,month%date:~-10,2%,time%time:~-11,2%,%time:~-8,2%.
echo. ==========================================================================
echo.
echo.
>>"%~dp0\error.log" 2>&1 echo -----------Part One ------------
ECHO PART ONE
>>"%~dp0\error.log" 2>&1 echo PART ONE
ECHO.
>>"%~dp0\error.log" 2>&1 echo %CD%
DIR/W
ECHO.
ECHO %CD%
ECHO.
ECHO THIS IS JUST A STARTING POINT...
pause
cls
echo Cleanup
>>"%~dp0\error.log" 2>&1 echo ------- Cleanup -------
>>"%~dp0\error.log" 2>&1 del /s *.html
>>"%~dp0\error.log" 2>&1 echo ----- End Cleanup -----
>>"%~dp0\error.log" 2>&1 echo.
echo.
echo cleanup finnished
pause
ECHO PART TWO
>>"%~dp0\error.log" 2>&1 echo .......................................
......
>>"%~dp0\error.log" 2>&1 echo PART TWO
ECHO.
:: UM, CHECK EACH SUB DIRECTORY
:: I GUESS I COULD START OFF SAYING IF SWF AND HTML EXISTS THEN NEXT.
:: THEN IF SWF FILE EXIST AND NO HTML THEN CREATE HTML WITH SAMPLE AND CHANGE TXT IN HTML
:: THEN GO TO NEXT DIRECTORY
>>"%~dp0\error.log" 2>&1 echo %CD%
ECHO %CD%
ECHO.
ECHO Update Operation In Progress - Please Stand By...
echo ^<!DOCTYPE HTML PUBLIC^> >>index.html
echo ^<html^> >>index.html
ECHO ^<body^> >>index.html
for /d /r %%a in (*) do (
if exist "%%a\*.swf" if not exist "%%a\%%~nxa.html" (
for %%b in ("%%a\*.swf") do (
(
echo ^<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"^>
echo ^<html xmlns="
http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"^>
echo ^<head^>
echo ^<title^>%%~nxb^</title^>
echo ^<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /^>
echo ^<script type="text/javascript" src="scripts/swfobject.js"^>^</script^>
echo ^<script type="text/javascript"^>
echo swfobject.registerObject("flashId", "9.0.0", "flash/expressInstall.swf"^);
echo ^</script^>
echo ^</head^>
echo ^<body^>
echo ^<center^>
echo ^<div^>
echo ^<object id="flashId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600"^>
echo ^<param name="movie" value="%%~nxb" /^>
echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
echo ^<!--[if !IE]^>--^>
echo ^<object type="application/x-shockwave-flash" data="%%~nxb" width="800" height="600"^>
echo ^<param name="FlashVars" value="name=Dr.Solve"/^>
echo ^<!--^<![endif]--^>
echo ^<div^>
echo ^<h1^>Alternative content^</h1^>
echo ^<p^>Get Adobe Flash player^</p^>
echo ^</div^>
echo ^</center^>
echo ^<!--[if !IE]^>--^>
echo ^</object^>
echo ^<!--^<![endif]--^>
echo ^</object^>
echo ^</div^>
echo ^</body^>
echo ^</html^>
) > "%%a\%%~nxa.html"
)
@rem echo "%%a\%%~nxa.html" >> "%~dp0\index.html"
echo ^<a href="%%a\%%~nxa.html"^>%%~nxa.html^</a^>^<br^> >> "%~dp0\index.html"
)
)
echo ^<!-- more content --^> >>index.html
echo ^<!-- you don't need to escape ( ) outside blocks --^> >>index.html
echo ^<!-- don't escape inside quotes "&" --^> >>index.html
ECHO ^</body^> >>index.html
echo ^</html^> >>index.html
echo.
ECHO END OF SCRIPT
ECHO PRESS ANYKEY
:: CHOICE DOES NOT WORK TO WAIT X AMOUNT OF SECOUNDS
:: CHOICE /C:d /N /Td,3
:: FOR %%D IN (40 40) DO CHOICE /C:d /N /Td,40
PAUSE
CLS
>>"%~dp0\error.log" 2>&1 echo =======================================================================
>>"%~dp0\error.log" 2>&1 echo --------------------------end of batch script--------------------------
@endlocal
================================================