ByteScout Barcode Reader SDK - VBScript - Batch Read Barcodes From Files - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Reader SDK – VBScript – Batch Read Barcodes From Files

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VBScript – Batch Read Barcodes From Files

How to batch read barcodes from files in VBScript with ByteScout BarCode Reader SDK

This code in VBScript shows how to batch read barcodes from files with this how to tutorial

Batch read barcodes from files is easy to implement in VBScript if you use these source codes below. Want to batch read barcodes from files in your VBScript app? ByteScout BarCode Reader SDK is designed for it. ByteScout BarCode Reader SDK is the SDK for reading of barcodes from PDF, images and live camera or video. Almost every common type like Code 39, Code 128, GS1, UPC, QR Code, Datamatrix, PDF417 and many others are supported. Supports noisy and defective images and docs. Includes optional documents splitter and merger for pdf and tiff based on found barcodess. Batch mode is supported for superior performance using multiple threads. Decoded values are easily exported to JSON, CSV, XML and to custom format.

VBScript code samples for VBScript developers help to speed up coding of your application when using ByteScout BarCode Reader SDK. This VBScript sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Implementing VBScript application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Download free trial version of ByteScout BarCode Reader SDK from our website with this and other source code samples for VBScript.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

BatchReadFromFiles.vbs
      
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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

run.bat
      
REM running from the command line cscript.exe BatchReadFromFiles.vbs "input" "results.csv" pause

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Explore Samples

Sign Up for ByteScout BarCode Reader SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next