From 22c7e761d06c0833a0808c7fd3a70f64f210f8f4 Mon Sep 17 00:00:00 2001 From: Tan Yu Xuan <37889443+weareblahs@users.noreply.github.com> Date: Mon, 8 Nov 2021 19:04:38 +0800 Subject: [PATCH] Scanner.bat from v1.0 --- scanner.bat | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scanner.bat diff --git a/scanner.bat b/scanner.bat new file mode 100644 index 0000000..5ff6ce7 --- /dev/null +++ b/scanner.bat @@ -0,0 +1,41 @@ +@echo off +cls +echo TheCommandLineScanner v1.0, made by weareblahs +echo This defaults the scan settings to 300 dpi, Black and White. +echo You can modify the script to change settings. +echo Initializing... +cd scans >nul +del *.png >nul +cd .. >nul +mkdir scans >nul +set /a result=0 +echo When you're ready, press any key. +pause >nul +cls +goto start + +:start +echo Scanning page... +:: Modify settings here +wia-cmd-scanner /w 0 /h 0 /dpi 300 /color BW /format PNG /output "scans\%date:~4,2%%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%.png" >nul +echo Please wait until the scanner finalizes scanning... +timeout 2 >nul +cls +set /a result=%result%+1 +echo %result% pages scanned. +echo Do you have any other pages to scan? +echo [Y]: Continue scanning - Please put the next page / paper +echo [N]: Complete scan +set /p check= +if %check%== Y goto start +if %check%== y goto start +if %check%== N goto end + + +:end +echo Scanning complete! +set /p pdf=Type the PDF location / filename (if same folder of script) of the resulting PDF file. Please include ".pdf" at the end of the filename: +cls +echo Saving... +magick scans\*.png "%pdf%" +echo Export to PDF complete! \ No newline at end of file