Looking for a solution of a common file management problem

Off-topic posts of interest to the "Everything" community.
Post Reply
stax76
Posts: 18
Joined: Thu May 23, 2019 12:53 am

Looking for a solution of a common file management problem

Post by stax76 » Sat Jan 02, 2021 5:04 am

I'm using Windows File Explorer in dark mode and noticed that for certain types of files I have 2 common use cases.

Example Image files, jpg, png etc.
------------------------------------------

1. Watching the image with an image viewer app, like mpv.
2. Editing the image with an image editing app, like paint.net

Scripts, Powershell, Python, Lua etc.
---------------------------------------------

1. Executing the script.
2. Editing the script, for instance with VS Code.

For ps scripts and any other text file types, my default file association is VS Code, and for execution I use Open with++, KeyLauncher and Windows Terminal. I'm very happy with the KeyLauncher solution and Windows Terminal but find the Open with++ solution inefficient for very frequent operations. What I would like to try is the following:

When I double-click a ps1 (or py) file in File Explorer, or press enter, VS Code starts to edit the file, now comes the trick, if I double-click or press enter while the Ctrl key is pressed, I want the script to be executed instead. I checked if Explorer opens it with Ctrl+Enter, and it does.

It's probably not difficult to build a tool that does what I want, it should not take more than a few hours. I already have built something related in the past:

WinAppLauncher

What I would like to ask however is if something similar or related already exists? Not necessary using File Explorer but also other file management tools.

NotNull
Posts: 2972
Joined: Wed May 24, 2017 9:22 pm

Re: Looking for a solution of a common file management problem

Post by NotNull » Sat Jan 02, 2021 4:24 pm

I am not aware of such an existing solution. Which of course doesn't mean that there isn't one ..


A slightly different approach, for inspiration purposes:
A long time ago I had the same need and solved this by associating a file extension with a "broker".
That broker showed a menu: Run / Edit / Enter parameters and that would start whatever I wanted.
So the workflow was: Press ENTER on a file, cursor to the desired function and press ENTER.

I no longer have my code for this as I delete everything that I no longer use, but you can get a rough impression by associating a file extension with OPENWITH.EXE (part of Windows 10; in the system32 folder)
That will show a list of programs that you used before to open/edit/ .. this extension
This information comes from HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList (for .jpg files)

gorheambn
Posts: 1
Joined: Mon Mar 01, 2021 5:33 pm

Re: Looking for a solution of a common file management problem

Post by gorheambn » Fri Mar 05, 2021 5:54 pm

I'd like to follow the tread for any useful pieces of advice as file management is my pain.
How all the stuff can be organized and easily searched if needed without being deleted?
Any ideas, guys?

Post Reply