diff --git a/how-tos/compute-to-data/make-a-boss-c2d-algorithm.md b/how-tos/compute-to-data/make-a-boss-c2d-algorithm.md index f89c47b1..776d79f8 100644 --- a/how-tos/compute-to-data/make-a-boss-c2d-algorithm.md +++ b/how-tos/compute-to-data/make-a-boss-c2d-algorithm.md @@ -48,3 +48,28 @@ with open(input_filename, 'r') as file: ``` ### Javascript + +``` +const fs = require("fs"); + +var input_folder = "/data/inputs"; +var output_folder = "/data/outputs"; + +async function processfolder(Path) { + var files = fs.readdirSync(Path); + for (var i =0; i < files.length; i++) { + var file = files[i]; + var fullpath = Path + "/" + file; + if (fs.statSync(fullpath).isDirectory()) { + await processfolder(fullpath); + } else { + + } + } +} + + + +processfolder(input_folder); + +```