Bulk File Transformer

This is a browser-based tool that allows you to define a custom JavaScript function which is used to bulk-convert a folder of files (using the new File System Access API).

Your data folder should contain an 'input' folder (filled with files and/or sub-folders) and an empty 'output' folder. Your data folder can optionally contain 'transform.js' which defines an async function called 'transform' that takes as input an object like this: {fileHandle, path, i, n} (the input file handle, the folder path to that file, the file index, and total number of files) and returns an object like this: {blob, name} (or an array of these objects, if each input should be converted into multiple output files). If the output name contains forward-slashes, sub-folders are made in the output folder to match the given path. If the data folder doesn't contain transform.js, you can use the code editor below to write the transform function.

The files in the input folder will be copied, transformed, and placed into the output folder with the new filenames as specified by the transform function. Note that your transform function is executed in Web Workers, using as many threads as you like (specified below).

The code for this web app is at @josephrocca/bulk-file-transformer on Github.


threads:
first files only (for testing)