mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-05 05:08:30 +08:00
12 lines
312 B
JavaScript
12 lines
312 B
JavaScript
const fs = require('fs');
|
|
const glob = require('glob');
|
|
const { resolve } = require('path');
|
|
|
|
glob.sync(resolve('./release', './*.exe')).forEach((item, i) => {
|
|
const newName = item.replace(/ /g, '-');
|
|
fs.rename(item, newName, (err) => {
|
|
if (err) throw err;
|
|
console.log('Rename complete!');
|
|
});
|
|
});
|