Skip to main content

system.kanoa.file.findFiles(folderPath, extensions)

Given a folder path, and a list of extensions, this function will return a list of files found


Parameters

folderPath String: Path to folder
extensions List of Strings: List of file extensions to check for i.e. ['.jpg', '.JPG', '.bmp', '.BMP']. Can be None for all


Returns

filePaths List


Example


folderPath = 'C:\Users\jason\Pictures\Saved Pictures' extensions = ['.jpg', '.JPG', '.bmp', '.BMP'] print system.kanoa.file.findFiles(folderPath, extensions)

[C:\Users\jason\Pictures\Saved Pictures\2022-07-10 03.21.12.jpg', 'C:\Users\jason\Pictures\Saved Pictures\2022-07-10 13.02.52.jpg']