I have also explored the possibility of an alternate script as under:

@echo off
setlocal enabledelayedexpansion

set "SourcePath=C:\Users\sareev\Pictures\SN RC\px-conversions"
set "OutputPath=C:\Users\sareev\Pictures\SN RC\Output\Output"
set "TesseractPath=C:\Program Files\Tesseract-OCR\tesseract.exe"

for %%A in ("%SourcePath%\*.tiff") do (
    echo Converting %%A...
    "%TesseractPath%" "%%A" "%OutputPath%\%%~nA"
)

endlocal

And I get the below error in the console output. P.S. German is the default
language of my CMD.
C:\Users\sareev\Downloads>ocr_script.bat

C:\Users\sareev\Downloads>ÁÄÇ?€?ÃÃŽËÁÈ€Á1>ŽŽËÁÈ€‚ë?ÍÊÄÁ  &
/ÈÇ…äš*íËÁÊË*Ë/ÊÁÁÎ* & ÑÄÈÍÊÁË*ë+€êä*øÌ Ä?1>Ë‚ŽËÁÈ€‚  | ÍÈøÍÈ &
/ÈÇ…äš*íËÁÊË*Ë/ÊÁÁÎ* & ÑÄÈÍÊÁË*ë+€êä* | ÍÈøÍÈ* | ÍÈøÍÈ‚ŽËÁÈ€‚èÁËËÁÊ/ÄÈ &
/ÈÇ…äš* & Ê?ÅÊ/_€ãÑÁË*èÁËËÁÊ/ÄÈ | äê*ÈÁËËÁÊ/ÄȆÁÌÁ‚ŽŽÃ?Ê€
Die Syntax für den Dateinamen, Verzeichnisnamen oder die
Datenträgerbezeichnung ist falsch.
Der Befehl "/ÈÇ…äš*íËÁÊË*Ë/ÊÁÁÎ*" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl "ÑÄÈÍÊÁË*ë+€êä*øÌ Ä?" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

Based on the German text in the console output, it seems that there is an
issue with the command syntax or the way the commands are written in the
script.

The specific error message I received states: "Die Syntax für den
Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch."
This translates to "The syntax for the filename, directory name, or the
volume label is incorrect." This error typically occurs when there is a
problem with the format or structure of the file or directory path provided
in the script.

However, I have rechecked everything and there are no issues with the
filenames etc.

On Tue, May 23, 2023 at 4:31 PM Varun Sareen <varunsi...@gmail.com> wrote:

> I am using the below batch file to run a ocr job on muliple jpg's. But
> nothing happens after I run the job. Is something wrong with the script??
>
> @Echo off
> Set _SourcePath=C:\Users\sareev\Pictures\SN RC\*.jpg
> Set _OutputPath=C:\Users\sareev\Pictures\SN RC\Output\
> Set _Tesseract="C:\Program Files\Tesseract-OCR\tesseract.exe"
> For %%A in (%_SourcePath%) Do Echo Converting %%A...&%_Tesseract% %%A
> %_OutputPath%%%~nA
> Set "_SourcePath="
> Set "_OutputPath="
> Set "_Tesseract="
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "tesseract-ocr" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tesseract-ocr/1QfPoXJhsbA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tesseract-ocr+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tesseract-ocr/e87e4497-ec95-4dc1-a63c-dbbf4911409bn%40googlegroups.com
> <https://groups.google.com/d/msgid/tesseract-ocr/e87e4497-ec95-4dc1-a63c-dbbf4911409bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tesseract-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAO16hYJsLwbOmss_Q2X6jg-w%2BzFgj34SjwB3oPMEWKr2BG7Jcg%40mail.gmail.com.

Reply via email to