Skip to content

FIX filenames using a manual button. #77

@bengarrett

Description

@bengarrett

There are a bunch of text files that end with the Windows style, duplicate filename numeric suffix.

  • TEXT.TXT
  • text (1).txt
  • Text (2).txt
  • TEXT (3).TXT
  • TeXt (999).zip

In the Site editor menu create a popup that counts the number of filenames with this syntax and have an option to mass-remove them.

# Count
SELECT count(*) AS files_with_numeric_suffix
FROM files
WHERE filename ~ '\s\(\d{1,3}\)(\.[^\.]+)$';

# List
SELECT filename AS files_with_numeric_suffix
FROM files
WHERE filename ~ '\s\(\d{1,3}\)(\.[^\.]+)$';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions