Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require('fs');
- function scaner(y,counter = 1){
- let y1 = fs.readdirSync(y);
- for(let x of y1){
- let stat = fs.statSync(y + x);
- if(!stat.isFile()){
- let path = y + x + '/';
- console.log(`${counter}` + x);
- scaner(path,counter++);
- }
- }
- }
- scaner('./');
Add Comment
Please, Sign In to add comment