File Exchange

image thumbnail

findFileSeries

version 1.1.0.0 (2.62 KB) by Georg D
automatically finds an indexed series of files in a directory (e.g. img001.tif, img002.tif, etc.)

0 Downloads

Updated 30 Nov 2011

View License

function [returnFileGroup] = findFileSeries(filePath, allowskiplength, inclSmallerNumbers)

% input is the filepath of one file in a series of files that have
% some numeric indexing in their filenames

% allowskiplength allows skipping of numbers in the index (default = 0 =>
% no skipping allowed, only an uninterrupted series of indixed filenames will be returned)

% inclSmallerNumbers: if false, we only look for filenames containing higher
% indices, if true, we also accept filenames with smaller indices than in filePath; default
% = false

Comments and Ratings (1)

Georg D

it doesn't matter if the indices inside the filenames are zeropadded, as long as the padding length is consistent.

Updates

1.1.0.0

Should work on Macs now as well...

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux