Skip to main content

Divide files into segments for a Pipeline Scan

To prepare for uploading application files to a Pipeline Scan, you can divide the files into smaller segments.

Send the following request to divide the file into segments on MacOS and Linux:

split -n {binary_segments_expected} {filename} 

To determine the approximate size for each segment, divide the binary_size value by the binary_segments_expected value. Property descriptions are available in the Pipeline Scan API specification.

This request creates output files named with three letters starting with xaa. For example, xaa, xab, and xac. The request creates the output files in the same directory as the original file.

Send the following request to divide the file into segments on Windows:

Split-File {full_path_to_file}\{filename} {binary_size}/{binary_segments_expected}

This request uses the Open Source PowerShell function Split-File, available on GitHub. This request creates files named file{nn}.dat. For example, file01.dat, file02.dat, and file03.dat.

You can parse the response values for {binary_size} and {binary_segments_expected} to create the Pipeline Scan request.

Send the following request to get the file size:

(Get-Item {filename}).length