Jump to content

Featured Replies

Posted

Write a program that automatically organizes files in a directory by file type. The program should:

Basic Requirements:

  1. Scan a directory for files.

  2. Create folders for different file types (e.g., Documents, Images, Videos).

  3. Move files into their respective folders based on their extensions.


Bonus Features:

  • Allow the user to specify the directory to organize.

  • Include an undo option to restore files to their original locations.

  • Add a custom ruleset that allows users to specify how files should be categorized (e.g., .py files go to Scripts).


Example Output:

Enter the directory to organize: /home/user/Downloads
Organizing files...
Files organized successfully:
- Documents: 12 files
- Images: 34 files
- Videos: 8 files

This challenge is practical for system administrators and developers, improving file management and automation skills! 😊

CodeName: Jessica

💻 Linux Enthusiast | 🌍 Adventurer | 🦄 Unicorn 
🌐 My Site | 📢 Join the Forum

spacer.png

 

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.