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

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.

Try it today: Get 60 Day Free Trial or sign up for Web API

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

Try it today: Get 60 Day Free Trial or sign up for Web API

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

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next