The Problem You notice that you always copy/download files for…

Question Answered step-by-step The Problem You notice that you always copy/download files for… The ProblemYou notice that you always copy/download files for school-related work to the same place in one directory named “downloads” where files are all mixed up and it’s difficult to find documents when you need it. To fix this confusion, you decide to create an application that will help you organize your files by course then by file type.Your application will monitor this directory for new content in 1 second intervals.  As soon as new files are detected, your application should evaluate the content and move the files to their respective course sub-directory (folder) and then to the appropriate sub-directory (folder) by file type. It will be assumed that for each group of detected changes (new files), the files will be all associated to the same course.Here is an example directory (folder) hierarchy for three courses (NOTE: there can be any number of courses):CPR101/    pdf_office/ <--- PDF and Office files       (Extensions: .pdf,.xlsx,.docx,.pptx)    c_h_txt/   <--- Source code and text files (Extensions: .c,.h,.txt)    images/   <--- Image files                (Extensions: .jpg,.png,.bmp,.gif)    videos/    <--- Video files                (Extensions: .mpeg,.mp4,.avi,.xvid)    other/     <--- Any other file typesIPC144/    pdf_office/    c_h_txt/    images/    videos/    other/ULI101/    pdf_office/    c_h_txt/    images/    videos/    other/When the application detects new files, it should look in the file names for a course code. Upon iterating all newly detected files, once a course code is found, all files will be moved to the same course sub-directory.  Otherwise, if no course code was found, your application should prompt the user to specify the course code and the input course code will determine the course sub-directory all the files should be moved to.  If the directory (folder) for the course code does not exist, one should be created.Within the course directory, each file type (based on extension) should be moved to the appropriate file-type sub-directory.  The file extensions associated to each sub-directory (folder) are listed in the above sample hierarchy.If a .zip file is found, the archived contents must be extracted and then the .zip file deleted (NOTE: you may assume .zip files will not contain directories/folders).  The application should process the extracted files as described above to move them into the appropriate course sub-directory (folder) and then into the respective file type sub-directories (folders).  Engineering & Technology Computer Science APS 145 Share QuestionEmailCopy link Comments (0)