const Folder = './fonts/';
const fs = require('fs');
const path = require('path');
fs.readdir(Folder, (err, files) => {
files.forEach(file => {
let fileName = path.parse(file).name
if (!fs.existsSync(Folder + fileName)) fs.mkdirSync(Folder + fileName);
fs.rename(Folder + file, Folder + fileName + '/' + file, function(err) {
if (err) console.log('ERROR: ' + err);
});
});
})