-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What feature or improvement do you think would benefit Files?
Add an optional setting to automatically select (not just focus) the next item after deleting a file or folder. This would enable macOS Finder-style keyboard workflow where users can sequentially delete multiple files by repeatedly pressing the Delete key.
While I understand that Files tries to mimic the native UX of Windows Explorer, I believe many users switch to it because Files is already so much better in many regards. MacOS people (like me) who struggle using Windows Explorer, will find Files a relieve. This feature would remove another every-day struggle using a file explorer on Windows, even though most Windows people will likely not use it.
Problem Description
Currently, after deleting a file using the keyboard:
- The deleted file is removed from the list
- The focus moves to the next item (dotted border/focus ring)
- The next item is not selected (no highlighted background)
- Pressing Delete again does nothing because no item is selected
- User must press Arrow Down/Up or click to re-select before deleting another file
This mimics Windows Explorer behavior, but creates friction for users who:
- Are migrating from macOS where Finder auto-selects the next item
- Want to quickly review and delete multiple files sequentially
- Prefer keyboard-centric workflows without needing to re-select after each deletion
Expected Behavior (with proposed setting enabled)
After deleting a file using the keyboard:
- The deleted file is removed from the list
- The next item is automatically selected (highlighted background)
- The next item also receives focus for keyboard navigation
- Pressing Delete again immediately deletes the next file
- User can sequentially delete files without additional keystrokes
Proposed Solution
Add a toggle setting in Settings > Folders (or Settings > Advanced):
Setting Name: "Auto-select next item after delete"
Description: "When enabled, the next item will be automatically selected after deleting a file or folder. This provides macOS Finder-like behavior for sequential deletions."
Default: Off (preserving current Windows Explorer behavior)
Technical Approach
The implementation would modify the post-delete handler in ShellViewModel to:
- Check the user preference setting
- If enabled, set both
SelectedItemsandFocusedItemto the next item in the list - If disabled, maintain current behavior (focus only, no selection)
Conceptual Code Change
// In ShellViewModel.cs, after delete operation completes
if (UserSettingsService.FoldersSettingsService.AutoSelectNextItemAfterDelete)
{
var nextIndex = Math.Min(deletedItemIndex, FilesAndFolders.Count - 1);
if (nextIndex >= 0)
{
var nextItem = FilesAndFolders[nextIndex];
SelectedItems.Clear();
SelectedItems.Add(nextItem);
FocusedItem = nextItem;
}
}Use Cases
- Photo/Media Curation: Reviewing a folder of images and deleting unwanted ones sequentially
- Download Cleanup: Going through a Downloads folder and removing old files one by one
- Code Cleanup: Removing obsolete files from a project directory
- Cross-Platform Users: Users switching between macOS and Windows who expect consistent behavior
Platform Comparison
| File Manager | Behavior After Delete |
|---|---|
| Windows Explorer | Focus only (no selection) |
| macOS Finder | Auto-select next item |
| Nautilus (GNOME) | Auto-select next item |
| Dolphin (KDE) | Auto-select next item |
| Total Commander | Configurable |
Additional Context
- This is a non-breaking change as the default would preserve current Windows Explorer behavior
- The setting would benefit keyboard-centric users and those with accessibility needs
- Related closed issue: Bug: Deleting file in grouped folder moves selection to random item #9429 (addressed random selection, but maintained focus-only behavior)
- Similar focus/selection issues have been reported in Keyboard Navigation Between Files And Folders #8352, Bug: Focus is lost when changing tabs #15288, Bug: Keyboard focus is changed when layout changes automaticlly #16530
Thanks a lot!
Stephan
Requirements
Requirements Checklist
- New setting in IFoldersSettingsService / FoldersSettingsService
- UI toggle in Settings > Folders page
- Localization strings for setting name and description
- Modify post-delete handler in ShellViewModel
- Unit tests for both enabled/disabled states
- Documentation update
Files Version
4.0.21.0
Windows Version
10.0.26200.7462
Comments
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status