Phase 2 · Node.js Fundamentals
ProjectsFile Organizer Script
Part of the Backend Developer Roadmap.
Summary
A script that scans a directory and automatically sorts files into folders by type or date — practice for the `fs` module, path manipulation, and async iteration.
How to Learn This
- 1Use `fs.promises.readdir` and `path.extname` to categorize files by type.
- 2Handle errors gracefully — permission issues, files in use.
- 3Add a `--dry-run` flag that previews changes without moving any files.
More projects in Node.js Fundamentals
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.