Saturday 15 May 2010

html - Not able to create tables by using batch cmd -



html - Not able to create tables by using batch cmd -

i want add together gif files table (html file) using batch command, facing problem below lines

set "table_start=^<table border='1'>" set "table_one=^<tr^>^<th^>^name^</th^>^<th^>^remarks^</th^>^</tr^>"

when edit html file in notepad don't see tags table border , row one. below finish code, can help me on this?

@echo off setlocal set "file_start=^<title^>^html table header giri^</title^>" set "table_start=^<table border='1'>" set "row_one=^<tr^>^<th^>^name^</th^>^<th^>^remarks^</th^>^</tr^>" set "image_start=^<tr^>^<th^>^<img src="" set ^"image_end="^>^</th^>^<th^>^remarks^</th^>^</tr^>" set "table_end=^</table^>" set "file_end=^</body^>^</html^>" set "file_name=index.html" >"%file_name%" ( echo %username% %date% %time% echo %file_start% %%i in (*.gif) echo %image_start%%%~fi%image_end% echo %file_end% ) start %file_name%

you never echoed table_start, row_one, or table_end file_name. additionally, missed 1 escape character @ end of table_start. seek this:

@echo off setlocal set "file_start=^<title^>^html table header giri^</title^>" set "table_start=^<table border='1'^>" set "row_one=^<tr^>^<th^>^name^</th^>^<th^>^remarks^</th^>^</tr^>" set "image_start=^<tr^>^<th^>^<img src="" set ^"image_end="^>^</th^>^<th^>^remarks^</th^>^</tr^>" set "table_end=^</table^>" set "file_end=^</body^>^</html^>" set "file_name=index.html" >"%file_name%" ( echo %username% %date% %time% echo %file_start% echo %table_start% echo %row_one% %%i in (*.gif) echo %image_start%%%~fi%image_end% echo %table_end% echo %file_end% )

html batch-file

No comments:

Post a Comment