Skip to content

New+: Fixed issue with files and folders containing only numbers#45439

Open
cgaarden wants to merge 1 commit intomicrosoft:mainfrom
cgaarden:Fix-New+-context-menu-not-showing-folders-with-only-numbers-(remake)
Open

New+: Fixed issue with files and folders containing only numbers#45439
cgaarden wants to merge 1 commit intomicrosoft:mainfrom
cgaarden:Fix-New+-context-menu-not-showing-folders-with-only-numbers-(remake)

Conversation

@cgaarden
Copy link
Contributor

@cgaarden cgaarden commented Feb 5, 2026

Summary of the Pull Request

Supersedes #41465

  1. Fix for where template file or folder only contained numbers
  2. Fix for where hidden files are shown in the list of templates

PR Checklist

  • Closes: New+ #36216
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • [n/a] Tests: Added/updated and all pass
  • [n/a] Localization: All end-user-facing strings can be localized
  • [n/a] Dev docs: Added/updated
  • [n/a] New binaries: Added on the required places
  • [n/a] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

  1. Fix for where template file or folder only contained numbers
    // Filename cases to support
    // type | filename | result
    // [file] | 01. First entry.txt | First entry.txt
    // [folder] | 02. Second entry | Second entry
    // [folder] | 03 Third entry | Third entry
    // [file] | 04 Fourth entry.txt | Fourth entry.txt
    // [file] | 05.Fifth entry.txt | Fifth entry.txt
    // [folder] | 001231 | 001231
    // [file] | 001231.txt | 001231.txt
    // [file] | 13. 0123456789012345.txt | 0123456789012345.txt

  2. Fix for where hidden files are shown in the list of templates
    Instead of excluding based on filename (desktop.ini) exclude based on hidden and system attribute being set

Validation Steps Performed

Before fix

Notice
1) Folders with numbers only aren't displayed on the context menu
2) Files with extension with numbers only show extension on the context menu
3) Some hidden files are shown
image

After fixes

Scenario 1

New+ Setting: Hide leading digits…: Yes
New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: No
image

Scenario 2

New+ Setting: Hide leading digits…: No
New+ Setting: Hide file extension: No
New+ Setting: Replace variables: No
image

Scenario 3

New+ Setting: Hide leading digits…: Yes
New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: Yes

image

@cgaarden
Copy link
Contributor Author

cgaarden commented Feb 5, 2026

Hi @niels9001, here's the PR for the folders with numbers only in them + various permutations. I've also ensured that hidden and systems files are excluded from the list of templates.

@vanzue vanzue changed the title Fixed issue with files and folders containing only numbers New+: Fixed issue with files and folders containing only numbers Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New+

1 participant