Delete files Custom

How the file deletion works

This function allows the user to delete specific files or file types from a chosen folder and all its subfolders.

Workflow

  • The console prompts the user to enter file extensions or exact file names
  • (e.g. .exe .bat UserInformation.txt).
  • Each entered value is validated:
  • - Accepted formats: .extension (e.g. .txt) or filename.extension (e.g. data.log). - Invalid formats are rejected with a warning.
  • The user selects a folder using the directory chooser dialog.
  • The program recursively searches through all subfolders for files matching the
  • given extensions or names.
  • All found files are deleted automatically.
  • Output

    The console shows:

  • The progress of the deletion process for each element.
  • The number of deleted files.
  • The total working time.