Coconote
AI notes
AI voice & video notes
Export note
Try for free
Solution and Shout Outs for Exercise 15
Jun 21, 2024
Solution of Exercise 15
Introduction
The solution to Exercise 15 is shown in the video.
Shout outs will also be given to those who provide the correct solution.
First, we will understand the problem and then find the solution.
Initial Setup
Folder 91 was copied and pasted.
The process of creating a folder and opening it in VScode was taught.
Extensions for all files were made first.
New files (PDF and JPG) were also created.
Coding Process
Started the NodeJS program.
Imported the
fs
module and ran the
npm init
command.
Set the type in
package.json
to 'module'.
Used
fs.promises
.
Attempted to read the files.
Programming Logic
Taught the process of reading files and extracting extensions.
Obtained the list of files using
fs.readdir
.
Processed the files through a for loop.
Taught how to check the existence of a directory.
Error Resolution
Identified and resolved the error of directory existence.
Corrected the path error.
Added an additional condition to not move JS and JSON files.
Fine-tuning and improvement of the program.
File Movement and Arrangement
Moved the files to the related extension folders.
Added new clutter to test the program.
Expressed satisfaction with the proper movement of files in the folder.
Shout Outs
Shout outs were given to students who provided the correct solution:
Adiraj
Ansh
Sonu Baira
Rakesh (70 push-ups)
Isha Chauhan
Narendra Mahat
Amit Kumar
Zubair Khan
Azar Saeed
Santosh Gupta
Aditya Gaming
College Blog
Amit Kumar
Shahid Reshi
Kapil Sutar
Wes Mughal
Praveen Mane
Gautam Roy
Saksham Singh
Shivansh Mathur
Conclusion
Suggested accessing and bookmarking the Sigma Batch playlist.
Appealed to review the course.
Thanks and promised to meet in the next video.
ЁЯУД
Full transcript