Mediadogg's Web Site

Sample .BAT Files
Home | DVDPca | MyTools Plugin | Mediachanger / GUI | LoadDVD Plugin | DVDProfileLoop | Ptouch Label Plugin | BulkEdit | SideCar | CQVGPServer | tlevel Plugins | FreeChng | WHS2WHS | Private

To use a .BAT file with DVDProfileLoop, you must code the file to access parameters passed from the plugin. For each DVD processed in the loop (filtered, flagged or tagged), the .BAT is called once. In addition, the .BAT file is called once before any DVDs are processed (for setup), and once after all DVDs are processed (for cleanup). The "runflag parameter is provided for you to know what is going on: runflag = 1 for setup, 2 for cleanup and runflag = 0 for DVD processing.
 
Two other non-data parameters are supplied: SequenceNo increments sequentially for each call to the .BAT file, and ProfileNo increments sequentially for each DVD profile. As of release 1.3 these two are identical, as there is only one call per DVD at this time.
 
The parameters are supplied to the .BAT file in order, %1, %2 ...
as they appear checked on the "Select Profile Data" window.
 
You can select all, any or none of the parameters supplied (about 100). DVDPL will attempt to automatically determine which pareneters are needed by the .BAT file from the REM statements. For example,
 
Rem %1 = runcode (1 = start, 0 = run, 2 = finish)
Rem %2 = Profile ID
Rem %3 = title
Rem %4 = Rating
Rem %5 = Tags
Rem %6 = thumbnailfront path
 
Automatically selects runcode, Profile ID, title, Rating, Tags and thumbnailfront path to be passed to the .BAT file in that order. Parameters are case semsitive and must be exactly as they appear in the selection window (up to but not including " -"), including blanks. You can optionally modify selections after the automatic selection takes place, and before the processing starts.
 

SmartphoneList.bat
 
@echo off
Rem Creates  simple HTML files  that should be compatible with most smartphones
Rem Uses folder {dvdpro}\plugins\dvdprofileloop\smartphone
Rem You must check runcode, formated upc, title, UPC and thumbnail front image path
Rem In that case:
Rem %1 = runcode (1 = start, 0 = run, 2 = finish)
Rem %2 = Profile ID
Rem %3 = title
Rem %4 = Rating
Rem %5 = Tags
Rem %6 = CollectionType
Rem %7 = thumbnailfront path
if  %1 ==1 goto :BEGIN
if  %1 ==0 goto RUN
if  %1 ==2 goto FINISH
goto OUT
:BEGIN
if not exist smartphone md smartphone
if not exist "smartphone\thumbnails" md "smartphone\thumbnails"
echo @echo off 1>copyfiles.bat
echo ^<html^>  1>".\smartphone\smartphonelist.html"
echo ^<html^>  1>".\smartphone\Ordered.html"
echo ^<html^>  1>".\smartphone\WishList.html"
echo ^<html^>  1>".\smartphone\ForSale.html"
echo ^<head^>  1>>".\smartphone\smartphonelist.html"
echo ^<title^>DVDProfiler Collection^</title^>  1>>".\smartphone\smartphonelist.html"
echo ^</head^>  1>>".\smartphone\smartphonelist.html"
echo ^<body^>  1>>".\smartphone\smartphonelist.html"
Rem First Do Owned
echo ^<h4^>My DVD Profiler Collection^</h4^>  1>>".\smartphone\smartphonelist.html"
echo ^<a href="smartphonelist.html"^>Owned^</a^>   ^<a href="Ordered.html"^>Ordered^</a^>   ^<a href="Wishlist.html"^>WishList^</a^>  ^<a href="ForSale.html"^>For Sale^</a^> 1>>".\smartphone\smartphonelist.html"
echo ^<HR^>  1>>".\smartphone\smartphonelist.html"
Rem Then Clone To the others
copy .\smartphone\smartphonelist.html .\smartphone\Ordered.html
echo ^<strong^>Ordered^</strong^>^<HR^> 1>>".\smartphone\Ordered.html"
copy .\smartphone\smartphonelist.html .\smartphone\WishList.html
echo ^<strong^>WishList^</strong^>^<HR^> 1>>".\smartphone\WishList.html"
copy .\smartphone\smartphonelist.html .\smartphone\ForSale.html
echo ^<strong^>For Sale^</strong^>^<HR^> 1>>".\smartphone\ForSale.html"
echo ^<strong^>Owned^</strong^>^<HR^> 1>>".\smartphone\smartphonelist.html"
goto OUT
:RUN
echo copy %7 .\smartphone\thumbnails\  1>>copyfiles.bat
if %5 == "'For Sale'" goto FORSALE
if %6 == Owner goto OWNED
if %6 == Ordered goto ORDERED
if %6 == "Wish List" goto WISHLIST
:OWNED
echo ^<p^>^<pre^>^<img src=".\thumbnails\%2f.jpg"width="40" height="60" align="top"^> %2 Rated: %4^&^#10 %3^</pre^>^</p^>  1>>".\smartphone\smartphonelist.html"
goto OUT
:ORDERED
echo ^<p^>^<pre^>^<img src=".\thumbnails\%2f.jpg"width="40" height="60" align="top"^> %2 Rated: %4^&^#10 %3^</pre^>^</p^>  1>>".\smartphone\Ordered.html"
goto OUT
:WISHLIST
echo ^<p^>^<pre^>^<img src=".\thumbnails\%2f.jpg"width="40" height="60" align="top"^> %2 Rated: %4^&^#10 %3 ^</pre^>^</p^>  1>>".\smartphone\WishList.html"
goto OUT
:FORSALE
echo ^<p^>^<pre^>^<img src=".\thumbnails\%2f.jpg"width="40" height="60" align="top"^> %2 Rated: %4^&^#10 %3^</pre^>^</p^>  1>>".\smartphone\ForSale.html"
goto OUT
:FINISH
echo ^</body^> 1>>".\smartphone\smartphonelist.html"
echo ^</html^> 1>>".\smartphone\smartphonelist.html"
call copyfiles.bat
:OUT

WatchedBy.bat
 
@echo off
Rem Creates  HTML Section of of who's watched DVDs
Rem Uses folder c:\watchedBy.html
Rem You must check runcode, title, allwatchedby
Rem In that case:
Rem %1 = runcode (1 = start, 0 = run, 2 = finish)
Rem %2 = title
Rem %3 = AllWatchedBy
if  %1 == 1 goto :BEGIN
if  %1 == 0 goto RUN
if  %1 == 2 goto FINISH
goto OUT
:BEGIN
echo ^<html^>  1>"c:\watchedby.html"
echo ^<title^>DVDs Watched By^</title^>  1>>"c:\watchedby.html"
echo ^</head^>  1>>"c:\watchedby.html"
echo ^<body^>  1>>"c:\watchedby.html"
echo ^<h4^>DVDs Watched By^</h4^>  1>>"c:\watchedby.html"
echo ^<HR^>  1>>"c:\watchedby.html"
goto OUT
:RUN
if %3 == "" goto OUT
:WATCHED
echo ^<p^>^<pre^>%2 ^&^#10  %3 ^</pre^>^</p^> 1>>"c:\watchedby.html"
goto OUT
:FINISH
echo ^</body^> 1>>"c:\watchedby.html"
echo ^</html^> 1>>"c:\watchedby.html"
:OUT

ForSale.bat
 
@echo off
Rem Creates  HTML Section of DVDs tagged for sale
Rem Uses folder {dvdpro}\plugins\dvdprofileloop\ForSale
Rem You must check runcode, Profile ID, title, Rating, Tags and thumbnail front image path
Rem In that case:
Rem %1 = runcode (1 = start, 0 = run, 2 = finish)
Rem %2 = Profile ID
Rem %3 = title
Rem %4 = Rating
Rem %5 = Tags
Rem %6 = thumbnailfront path
if  %1 == 1 goto :BEGIN
if  %1 == 0 goto RUN
if  %1 == 2 goto FINISH
goto OUT
:BEGIN
echo ^<html^>  1>"c:\forsale.html"
echo ^<title^>DVDs For Sale^</title^>  1>>"c:\forsale.html"
echo ^</head^>  1>>"c:\forsale.html"
echo ^<body^>  1>>"c:\forsale.html"
echo ^<h4^>DVDs For Sale^</h4^>  1>>"c:\forsale.html"
echo ^<HR^>  1>>"c:\forsale.html"
goto OUT
:RUN
if %5 == "For Sale" goto FORSALE
goto OUT
:FORSALE
echo ^<p^>^<pre^>^<img src=%6 width="40" height="60" align="top"^> %2 ^&^#10 %3 Rated: %4^</pre^>^</p^> 1>>"c:\forsale.html"
goto OUT
:FINISH
echo ^</body^> 1>>"c:\forsale.html"
echo ^</html^> 1>>"c:\forsale.html"
:OUT

Tagged.bat
 
@echo off
Rem Creates  HTML Section of Tagged DVDs
Rem Uses folder c:\tagged.html
Rem You must check runcode, title, Tags
Rem In that case:
Rem %1 = runcode (1 = start, 0 = run, 2 = finish)
Rem %2 = title
Rem %3 = Tags
if  %1 == 1 goto :BEGIN
if  %1 == 0 goto RUN
if  %1 == 2 goto FINISH
goto OUT
:BEGIN
echo ^<html^>  1>"c:\tagged.html"
echo ^<title^>DVDs Watched By^</title^>  1>>"c:\tagged.html"
echo ^</head^>  1>>"c:\tagged.html"
echo ^<body^>  1>>"c:\tagged.html"
echo ^<h4^>Tagged DVDs^</h4^>  1>>"c:\tagged.html"
echo ^<HR^>  1>>"c:\tagged.html"
goto OUT
:RUN
if %3 == "" goto OUT
:TAGGED
echo ^<p^>^<pre^>%2 ^&^#10  %3 ^</pre^>^</p^> 1>>"c:\tagged.html"
goto OUT
:FINISH
echo ^</body^> 1>>"c:\tagged.html"
echo ^</html^> 1>>"c:\tagged.html"
:OUT

Enter content here

Enter supporting content here