Add new item to Windows 11 New Context Menu - New Folder With Selection


itsbloodbrother

New member
Local time
7:28 PM
Posts
2
Visit site
OS
Windows 11
Hey Gang,

Trying to find a way to add a custom entry to Windows 11 New Context Menu: New Folder With Selection

Originally a macOS feature, if you select two or more items in a folder, then right-click them, you would see the option New Folder With Selection. Selecting that menu item will automatically create a new folder in-place, moves the selected items into it, names the folder 'New Folder With Selection' and immediately highlights and enables folder rename so you can rename the folder if you wish - all in one step.

Currently, there are a couple freeware programs the create this entry in the old context menu: TeraCopy, and Files2Folder.

TeraCopy works pretty good, but alas it enables the entry only in the old context menu, and also does not allow you to undo the action when it as performed.

Any help is appreciated!
 
Windows Build/Version
Windows 11 Home 64-bit 23H2 22631.4317

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus
Welcome to the forum. Others may know more and prove me wrong, but I don't think what you want can be done. While programs can add entries associated with the program to the context menu, AFIK one can't just make up something to add to any context menu. And that's basically what you are asking for since it is not a native Windows entry or valid application entry. There is no function to associate it to in the registry.

I know this tutorial is not what you want to do, but scroll down to the bottom for other tutorials related to "new" context menu to see if there is any help there. Also these are 10 tutorials. I could not find their equivalent in this forum but most apply to 11 as well..
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.2314
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1tb Solidigm m.2 nvme+256gb SKHynix m.2 nvme /External drives 512gb Samsung m.2 sata+1tb Kingston m2.nvme+ 4gb Solidigm nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 10 Pro 22H2 19045.3930
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 9020
    CPU
    i7-4770
    Memory
    24 gb
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    256 gb Toshiba BG4 M.2 NVE SSB and 1 tb hdd
    PSU
    500w
    Case
    MT
    Cooling
    Dell factory
    Mouse
    Logitech wireless
    Keyboard
    Logitech wired
    Internet Speed
    still not telling
    Browser
    Firefox
    Antivirus
    Defender+MWB Premium
Add Copy to/Move to Folder to the context menu is as close you will get without some major hack.

Win-1528.png

Win-1524.png

Win-1525.png

Win-1527.png


 

My Computers

System One System Two

  • OS
    Windows Pro 23H2 Build 22631.4249
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
You can make the new folder on any drive in your PC as a destination (Pic 2) and when you click move, that is where they will be.
I suppose this is literally what you asked for? Or at least as close to...
 

My Computers

System One System Two

  • OS
    Windows Pro 23H2 Build 22631.4249
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
You can make the new folder on any drive in your PC as a destination (Pic 2) and when you click move, that is where they will be.
I suppose this is literally what you asked for? Or at least as close to...
I did in fact find this solution on another forum. Although it works, the ease of use is slightly diminished with the included extra button clicks as compared to the option provided by TeraCopy. I've provided a picture for you.

Welcome to the forum. Others may know more and prove me wrong, but I don't think what you want can be done. While programs can add entries associated with the program to the context menu, AFIK one can't just make up something to add to any context menu. And that's basically what you are asking for since it is not a native Windows entry or valid application entry. There is no function to associate it to in the registry.

I know this tutorial is not what you want to do, but scroll down to the bottom for other tutorials related to "new" context menu to see if there is any help there. Also these are 10 tutorials. I could not find their equivalent in this forum but most apply to 11 as well..
Thank you kindly! Doing some research, and asking ChatGBT to write me code, I was able to add the command to the registry in the modern context menu. With a couple different approaches of using PowerShell or AutoIt, I was close.

This might get a bit lengthy, I'm posting my findings as I was maybe 50% the way there, but gave up after a few hurdles. Perhaps this might encourage other users to take the dive?

--------

Here's what ChatGBT created with a PowerShell Extension:

Step 1: Create the PowerShell Script​

  1. Open a Text Editor like Notepad.
  2. Paste the following script into it:
# PowerShell Script to create a new folder and move selected files
param (
[string[]]$Files
)

# Determine the parent directory of the first selected file
$ParentFolder = Split-Path -Path $Files[0]

# Define a new folder name based on the current timestamp
$NewFolderName = "New Folder " + (Get-Date -Format "yyyy-MM-dd_HH-mm-ss")
$NewFolderPath = Join-Path -Path $ParentFolder -ChildPath $NewFolderName

# Create the new folder
New-Item -ItemType Directory -Path $NewFolderPath

# Move each selected file into the new folder
foreach ($File in $Files) {
Move-Item -Path $File -Destination $NewFolderPath
}

3. Save the Script: Save it with a .ps1 extension, like NewFolderWithSelection.ps1, in a location where it won’t be moved (e.g., C:\Scripts\NewFolderWithSelection.ps1).​

Step 2: Create the Registry Entry​

Now, we’ll add an option to the context menu that calls this PowerShell script.
  1. Open Registry Editor:
    • Press Win + R, type regedit, and press Enter.
  2. Navigate to the Shell Location:
    • Go to:
HKEY_CLASSES_ROOT\*\shell
  • Create a New Key:
    • Right-click on shell, choose New > Key, and name it New Folder with Selection.
  • Set Up the Command:
    • Inside the New Folder with Selection key, create a new key named command.
    • Double-click on the (Default) value in command, and enter the following command, adjusting the script path if needed:
powershell -ExecutionPolicy Bypass -File "C:\Scripts\NewFolderWithSelection.ps1" "%1"

Step 3: Test It Out​

  1. Select multiple files in a folder.
  2. Right-click, and you should see the New Folder with Selection option in the modern context menu.
  3. Click it to run the script, which will create a new folder and move the selected files into it.
This is what it looked like in the end:


------------------------------------

Pretty close! Couple things to note:

1. The powershell command prompt window appears for EACH file being added to the new folder, sort of ruining the seamless integration of the command.
2. Sometimes the window minimizes after completion.
3. Rename is not enabled on the newly created folder.
4. Not all files showed the 'New Folder from Selection' when right-clicked.
-------------------------------------

So this is were I went down the rabbit hole of asking ChatGBT to try the update the code. I asked how to remove any opening windows, and making sure F2 is pushed after the folder is made. Powershell or AutoIt was recommened so would be F2. I also asked ChatGBT to do the code without any external programs, which led me to using .bat files and .vbs files to issue the commands. I was having moderate success, as the .bat file would issue the proper command when drag and dropping multiple files on the .bat in file explorer. The VBS was giving me issues, when utilizing registry to point to the VBS file under the modern context menu as 'New Folder with Selection', all I recieved was 'This app can't run on your PC'.

There's just too much wrong code to post my findings. BUT! Powershell did sort of work, which means, it's gotta be possible.

TL'DR:
I used ChatGBT to write code that utilized PowerShell to create the command. It half worked. Will post more findings if anything comes up. Feel free expand on this.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus
Back
Top Bottom