This sample source code below will display you how to batch read barcodes from files with barcode reader sdk in VBScript. ByteScout Premium Suite can batch read barcodes from files with barcode reader sdk. It can be applied from VBScript. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
The following code snippet for ByteScout Premium Suite works best when you need to quickly batch read barcodes from files with barcode reader sdk in your VBScript application. Simply copy and paste in your VBScript project or application you and then run your app! Enjoy writing a code with ready-to-use sample codes in VBScript.
Trial version of ByteScout Premium Suite is available for free. Source code samples are included to help you with your VBScript app.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
if WScript.Arguments.Count < 2 Then
MsgBox "Run with the folder path as the argument" & vbCRLF & vbCRLF & "BatchReadFromFiles.vbs <InputFolder> <OutputFolder>"
WScript.Quit 0
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
' define allowed input images extensions
inputImagesExtensions = "JPG,JPEG,PNG,BMP,PDF,TIF"
Set reader = CreateObject("Bytescout.BarCodeReader.Reader")
' Set barcode types for searching
reader.BarcodeTypesToFind.Code39 = True
reader.BarcodeTypesToFind.QRCode = True
reader.BarcodeTypesToFind.PDF417 = True
reader.BarcodeTypesToFind.EAN13 = True
Set objInputFolder = objFSO.GetFolder(WScript.Arguments(0))
Set objResultsFile = objFSO.CreateTextFile(WScript.Arguments(1), True)
Call ProcessFolder(objInputFolder)
WScript.Quit 0
Sub ProcessFolder(folder)
Set objFolder = objFSO.GetFolder(folder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
' Check the file type
If inStr(inputImagesExtensions, UCase(objFSO.GetExtensionName(objFile.Name))) > 0 Then
' Read barcode from file
WScript.Echo "Reading from: " & objFile.Path
reader.ReadFromFile objFile.Path
Dim csv
csv = reader.ExportFoundBarcodesToCSV_4
objResultsFile.Write csv
End If
Next
For Each subFolder in folder.SubFolders
ProcessFolder subFolder
Next
End Sub
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
REM running from the command line
cscript.exe BatchReadFromFiles.vbs "input" "results.csv"
pause
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: