title: Batch Alternative to Windows Photo Printing Wizard
body: <p>Batch script to print multiple images in a single Letter size (1200x800px) sheet, layout upto 300 pics fit in 1 sheet. this can't be done on Windows photo printing wizard, unless the pic is crop or lose data. SO d idea is to resize pic &amp; divide sheet using batch script, html &amp; IE. here is code snippet, need to simplyfy it upto 300 (Plz run it once before answer..!)</p>
  
  <pre><code>Print.cmd
  @echo off &amp;title ThumPic (siva) &amp;color 3f &amp; DEL "c:\zz.html"
  setlocal EnableDelayedExpansion
  :j
  set j=200
  set u=0
  set o=0
  set /p j=How many in a page?
  set /p o=Prez1 to print name?
  if %j% LEQ 2 goto p1
  if %j% LEQ 4 goto p2
  if %j% LEQ 6 goto p3
  if %j% LEQ 9 goto p4
  if %j% LEQ 12 goto p5
  if %j% LEQ 16 goto p6
  if %j% LEQ 20 goto p7
  if %j% LEQ 25 goto p8
  if %j% LEQ 30 goto p9
  if %j% LEQ 36 goto p10
  if %j% LEQ 42 goto p11
  if %j% LEQ 49 goto p12
  if %j% LEQ 56 goto p13
  if %j% LEQ 64 goto p14
  if %j% LEQ 72 goto p15
  if %j% LEQ 81 goto p16
  if %j% LEQ 90 goto p17
  if %j% LEQ 100 goto p18
  
  goto j
  
  :p1
  if %o% EQU 1 set d=%%~nxi &amp; set u=45
  set /a w=800
  set /a h=1025/2-%u%
  set m=2
  goto print
  :p2
  if %o% EQU 1 set d=%%~nxi &amp; set u=45
  set /a w=800/2
  set /a h=1025/2-%u%
  set m=3
  goto print
  :p3
  if %o% EQU 1 set d=%%~nxi &amp; set u=45
  set /a w=800/2
  set /a h=1025/3-%u%
  set m=3
  goto print
  :p4
  if %o% EQU 1 set d=%%~nxi &amp; set u=30
  set /a w=800/3
  set /a h=1025/3-%u%
  set m=4
  goto print
  :p5
  if %o% EQU 1 set d=%%~nxi &amp; set u=30
  set /a w=800/3
  set /a h=1025/4-%u%
  set m=4
  goto print
  :p6
  if %o% EQU 1 set d=%%~nxi &amp; set u=30
  set /a w=800/4
  set /a h=1025/4-%u%
  set m=5
  goto print
  :p7
  if %o% EQU 1 set d=%%~nxi &amp; set u=25
  set /a w=800/4
  set /a h=1025/5-%u%
  set m=5
  goto print
  :p8
  if %o% EQU 1 set d=%%~nxi &amp; set u=30
  set /a w=800/5
  set /a h=1025/5-%u%
  set m=6
  goto print
  :p9
  if %o% EQU 1 set d=%%~nxi &amp; set u=25
  set /a w=800/5
  set /a h=1025/6-%u%
  set m=6
  goto print
  
  :print
  echo ^&lt;table cellspacing=2^&gt; &gt;&gt;"c:\zz.html"
  for %%i in (%*) do (
  set /a "p=p+1"
  set "bo="
  if !p! == !m! (set "p=1" &amp; set "bo=&lt;tr&gt;")
  echo !bo!^&lt;td^&gt;^&lt;img width=%w% height=%h% src=%%i^&gt;^&lt;br^&gt;%d%&gt;&gt;"c:\zz.html" )
  start c:\windows\explorer.exe "c:\zz.html" &amp;exit
  </code></pre>
  
  <blockquote>
    <p>Put this code in <code>%userprofile%</code> <code>SENDTO</code> folder , right click several images >Sent To and Print.cmd, script writing upto 300 is mess i need to simplyfy/find common , layout it goes like this 1/1,1/2,2/2,2/3,3/3,3/4,4/4,4-5,5/5..etc upto300 that divide 1200x800pix equally</p>
  </blockquote>