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! 😊

  • Views 80
  • Created
  • Last Reply

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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.