Less than 2 sec to Clean and Organise your Desktop and Downloads
Hi, is your Desktop look messy with unwanted files or your downloads folder is filled with too many items. You can clean it in Less than 5 sec. We are going to use a simple Ruby script that automatically categories the files and moves them to the current folder. Github link : https://github.com/aravindaakash/selenium-automation/tree/main/desktop_cleaner Source Code: (On-demand clean up) require 'fileutils' home_path = Dir.home source_location = "#{home_path}/Desktop" destination_location = "#{home_path}/Documents" destination_folder = "#{destination_location}/Desktop_files" source_files = Dir.glob("#{source_location}/*") Dir.mkdir(destination_folder) unless Dir.exist?(destination_folder) errors_messages = [] source_files.each do |file| destination_type_folder = destination_folder unless File.directory?(file) file_type = file.split('.').last ...