Hello,

i need to convert several hundres .tif images to OCR. what i am looking for
is an automated process that will convert every single file in a specific
directory without any user input.

any help and or suggestions are greatly appreciated.

thanks
Surge

Re: mspview by J

J
Mon Jun 18 08:15:26 CDT 2007

ok.... how do you intend to "convert" them first of all? do you have
software that will do this?



"Sergio Sanchez" <sanser@charter.net> wrote in message
news:9vndi.61$5Z.45@newsfe03.lga...
> Hello,
>
> i need to convert several hundres .tif images to OCR. what i am looking
> for is an automated process that will convert every single file in a
> specific directory without any user input.
>
> any help and or suggestions are greatly appreciated.
>
> thanks
> Surge
>


Re: mspview by sanser11

sanser11
Mon Jun 18 09:24:40 CDT 2007

windows Xp has a native application called Mspview.exe. it is found
at the following location on my pc C:\Program Files\Common Files
\Microsoft Shared\MODI\11.0

this is the app i want to use to convert to tif files to ocr. i can
convert indivdual files to ocr but i want to automate a process to do
all files.



Re: mspview by Tim

Tim
Mon Jun 18 10:51:35 CDT 2007

Hi Sergio,

I'm not familiar with OCR process (or with MSPVIEW), but I found the
command line parameters for MSPVIEW here:
http://office.microsoft.com/en-us/help/HP030832691033.aspx
I'm guessing that the -f parmeter is what you want. Check out the
script below, it will OCR any .tif file within sPathToInputFolder or
within any of sPathToInputFolder's
subfolders. Once you are confident it is
doing what you want, comment out the MsgBox lines so that you don't
have to press 'OK' for every file.

Tim.

Option Explicit
Dim sPathToMSPView
Dim sPathToInputFolder
Dim oFSO
Dim oFolder
Dim oFile
Dim oShell

'CONFIGURE THESE*****************
sPathToMSPView = "C:\Program Files\Common Files\Microsoft Shared
\MSPaper\mspview.exe"
sPathToInputFolder = "C:\Test"
'********************************


Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(sPathToInputFolder)
Set oShell = CreateObject("WScript.Shell")


'call our function to OCR all files in the InputFolder
'the function will call itself for each subfolder (and each of thier
subfolders etc)
OCRAllFilesInFolder oFolder

MsgBox "Finished"

Public Sub OCRAllFilesInFolder(oFolder)
Dim oSubFolder
Dim sCommand

For Each oFile In oFolder.Files

'only do this for .tif files
If UCase(Right(oFile.Path,4)) = ".TIF" Then

sCommand = """" & sPathToMSPView & """ -f """ & oFile.Path &
""""
MsgBox "About to OCR " & oFile.Path & " using the command:" &
vbCrLf & sCommand
oShell.Run sCommand, 1, True 'Use 1 to run in Normal window, 0
to run invisible etc, etc. Use True to make this script wait for the
command to finish
Else
MsgBox oFile.Path & " is not a .tif file, skipping it..."
End If

Next 'oFile

'Now call for each of this folders SubFolders
For Each oSubFolder In oFolder.SubFolders
OCRAllFilesInFolder oSubFolder
Next

End Sub


Re: mspview by Surge

Surge
Mon Jun 18 12:33:21 CDT 2007

Hi Tim,

thanks alot your solution worked... i just had to clean up whitepsaces
and correct the comments.

Awesome!!



Re: mspview by Tim

Tim
Mon Jun 25 06:47:53 CDT 2007

Surge,

No, problem, I'm just glad it worked!

Tim.