Page 1 of 1

Error adding FLATTEN to context menu

Posted: 26 Feb 2026 17:31
by billgilliss
Hi - When adding FLATTEN FOLDER to the context menu for either the Folder tree or the File List, I get the following error message: "Shutdown Run-time error '91' Object variable or With block variable not set." FLATTEN FOLDER is the main reason I bought XYplorer in the first place, so this is kind of distressing. I'm brand new to the program.

Windows 11, XYplorer 28.20.0300, 2560x1920

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 17:38
by highend
When exactly?

After checking the [ ] Flatten Folder in the dialog window?
When hitting "OK" in the same dialog?
2026-02-26_17-35-51.png
When exiting the Configuration... dialog window with "OK"?

Does it work in a fresh XY instance?

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 17:41
by billgilliss
Every time immediately after hitting "Okay." Yes, fresh instance.

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 18:08
by admin
Can't reproduce. Does it only happen with Flatten Folder or also with other settings?

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 21:56
by billgilliss
This happens with all the Context Menu > Folder Tree and Context Menu > File List options.

It doesn't happen with anything else in Mouse, Menus, Usability.

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 22:25
by jupe
It's bizarre the error has "shutdown" as the window caption, I don't think I have ever seen one of those errors that has anything other than "XYplorer", also that :!: icon looks like the old comctl version that has 3d shading.

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 23:37
by admin
I think the error and the icon are owned by twinBASIC.

billgilliss: does it also happen when you do not change any checkboxes and just click OK? Or just click Cancel?

Re: Error adding FLATTEN to context menu

Posted: 26 Feb 2026 23:53
by billgilliss
No, it does not happen if I just click OK or cancel. Only with the Folder Tree and File List options.

Re: Error adding FLATTEN to context menu

Posted: 27 Feb 2026 08:26
by admin
I meant the OK in the Folder Tree and File List options.

Re: Error adding FLATTEN to context menu

Posted: 28 Feb 2026 00:35
by billgilliss
I'll check.

In the mean time, it turns out that File Explorer can do just what I wanted in the first place:

Method 1: Using Windows File Explorer
Open the main folder containing all the subfolders.
In the top-right corner search bar, type * and press Enter. This tells Windows to search for all files within subfolders.
Wait for the search to complete, then press Ctrl+A to select all files.
Drag and drop or copy and paste the selected files into your target destination folder.
If files have the same name, Windows will prompt you to rename them or skip them.