Last active
March 28, 2020 06:49
-
-
Save victorchee/c311054624457778e600abb1409616b3 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
const fs = require('fs'); | |
const read = fs.readdirSync('./'); | |
let string = ''; | |
for (let i in read) { | |
const item = read[i]; | |
const index = item.lastIndexOf('.'); | |
string += item.substring(0, index) + '\n'; | |
} | |
fs.writeFileSync('./imagenames.txt', string); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment