testrun longparam.bat 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. REM Explaination
  2. REM For use of FOR type FOR /? at prompt
  3. REM The first part specifies ; lines to be ignored
  4. REM I want the first 2 items (delimited by , or [space] on each line from the file specified.
  5. REM Variables will be %%i (%%j is created automatically)
  6. REM execute docto inserting variables
  7. REM %~d0 and %~p0 together give the full directory this batch file is executing in.
  8. REM Remove all generated files that may exist.
  9. del GeneratedFiles\*.* /q
  10. pause
  11. "../exe/docto.exe" -h
  12. REM Individually try each format on Test Document
  13. REM FOR /F "eol=; tokens=1,2* delims=, " %%i in (testdata.txt) do "../exe/docto.exe" --inputfile "%~d0%~p0\Inputfiles\pie3.doc" --outputfile "%~d0%~p0GeneratedFiles\pie3out_%%i.%%j" -T %%i
  14. REM Try on Directory
  15. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\" -o "%~d0%~p0GeneratedFiles" --format wdFormatPDF --outputextension pdf
  16. REM Try on Single
  17. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\Pie3Single.pdf" --FORMAT wdFormatPDF
  18. REM Try on Single no output file with Verbose Logging
  19. "../exe/docto.exe" --LOGLEVEL 10 -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\SingleDir\" --FORMAT wdFormatPDF
  20. REM Try on Single no output file with Verbose Logging
  21. "../exe/docto.exe" -L 10 -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\SingleDirNoSlash" -T wdFormatXMLDocument
  22. REM Should produce an error
  23. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\Pie3.pdf" -T wdFormatTestPDF
  24. REM Should produce an error
  25. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3_doesntexist.doc" -o "%~d0%~p0GeneratedFiles\Pie3.pdf" -T wdFormatPDF
  26. REM Test Webhook
  27. REM *********************************
  28. REM To view visit http://toflidium.com/webhooks/docto/docto_test_values.txt
  29. REM *********************************
  30. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\Pie3.pdf" -T wdFormatPDF -W http://home.kinchik.ie/webhooks/docto/all.php
  31. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\Pie3b.pdf" -T wdFormatPDF -W http://home.kinchik.ie/webhooks/docto/all.php?
  32. "../exe/docto.exe" -f "%~d0%~p0Inputfiles\pie3.doc" -o "%~d0%~p0GeneratedFiles\Pie3c.pdf" -T wdFormatPDF -W http://home.kinchik.ie/webhooks/docto/all.php?Aparam=avalueIhave
  33. REM XLSTO
  34. REM Try on Directory
  35. "../exe/xlsto.exe" -f "%~d0%~p0Inputfiles\" -o "%~d0%~p0GeneratedFiles" -T xlPDF -OX .pdf