Last active
January 10, 2017 14:49
-
-
Save Shwartz/9ba864fa92243c60d0f2fb2d35ae2835 to your computer and use it in GitHub Desktop.
Noje.js Gulp rename files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('rename', function () { | |
var fs = require('fs'); | |
var fileList = ''; | |
fs.readdir('sass/test', function(err, files) { | |
files.forEach(function (file) { | |
console.log('file: ', file); | |
fs.rename('sass/test/' + file, 'sass/test/_' + file, function (err) { | |
if (err) console.log('ERR: ' + err); | |
}) | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment