ikas-mc / ContextMenuForWindows11

Add Custom Context Menu For Windows11
GNU Lesser General Public License v3.0
1.85k stars 90 forks source link

Ability to do character substitution for the {name} #107

Closed benze closed 7 months ago

benze commented 8 months ago

I wanted to create a context shortcut to send a file by Outlook. However, to use the CLI and specify a subject or body with the filename requires using %20 instead of spaces in the filename (essentially URL encoded).

Any ability to do standard bash-style character replacement in the {} would be great. For example: {name// /%20}

ikas-mc commented 8 months ago

Scripts are recommended

use ps example: [System.Diagnostics.Process]::Start('"C:\Program Files\7-Zip\7zG.exe"', '"x "{path}" -o"{parent}\' +[System.IO.Path]::GetFileNameWithoutExtension('"{name}"') + '"')