Skip to content

Instantly share code, notes, and snippets.

@shieva
shieva / index.js
Created Feb 4, 2018
change timestamp of files in nodejs
View index.js
const moment = require('moment');
const fs = require('fs');
var Utimes = require('@ronomon/utimes');
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
const folder = '100';
const files = fs.readdirSync(folder);
// console.log(files)
async function changeTimestamp() {
for (const index in files) {