Files icon indicating copy to clipboard operation
Files copied to clipboard

Feature: Expand support for command line arguments

Open deathrjj opened this issue 2 years ago • 6 comments

What feature or improvement do you think would benefit Files?

It would be great to have command line arguments for Files. Personally I am currently using AutoHotkey to assign multiple keybinds to quickly launch my most used directories, however it would be great to have more functionality than just opening a directory.

Adding command-line arguments such as adding and removing Tags, has alot of potential as it could allow for integration with other programs, allowing for a program to automatically give files it creates Tags for example.

Thats just one example but I'm sure there are so many other things that could be added as arguments which would allow for so much more opportunity for Files to be integrated with other apps. This would not only help individual users workflows, it could also be integrated into almost any application (as almost everything uses files in some way).

Also could have the benefit of users of Files promoting the App by telling other people the fact that another app that they use is improved via the use of an integration with Files.

Some of the arguments I can think of that would be nice to have are: --new-tab --new-window --new-pane ^These could have additional: -sort-by [options (list), direction] -group-by [options (list), direction] --compact --add-favourite --remove-favourite --add-tag --remove-tag --create-tag --edit-tag --delete-tag --version --log --theme (dark/light/default) --background (Preset name or Hexcode)

Requirements

  • Command-line Arguments that can be used to perform and control various actions within Files.

The most important ones to add in my opinion are listed below. More could be added over time

  • Launch specified path in a new Tab / Window / Split-pane
  • Add/Remove Tags from specified path
  • List/Create/Edit/Delete Tags
  • Change Theme (Default/Light/Dark)
  • Toggle Theme to change to opposite of current
  • Change Background to specified name from the preset options or to specified hex code (or rgb/hsv if you wanted to add those options too)

Files Version

2.5.20.0

Windows Version

10.0.19045.3208

Comments

No response

deathrjj avatar Jul 21 '23 13:07 deathrjj

Thank you for your feedback.

yaira2 avatar Jul 21 '23 14:07 yaira2

Hi! I'd like to contribute by implementing this feature. Could someone point me in the right direction on where to start? Any specific classes or parts of the codebase I should focus on?

luizera666 avatar Aug 27 '24 16:08 luizera666

We haven't settled on the commands but a proof of concept would help.

Any specific classes or parts of the codebase I should focus on?

InitializeApplicationAsync in MainWindow.xaml.cs.

yaira2 avatar Aug 27 '24 16:08 yaira2

The most helpful in my opinion would be to open new tab / new window in a specified directory

And the ability to add / remove / create tags from command line would be great for automating labelling with tags

deathrjj avatar Aug 30 '24 11:08 deathrjj

Edit2

I installed this from Microsoft store. But couldn't figure out how to trigger it from console. My current workaround is

Start-Process "shell:AppsFolder\49306atecsolution.FilesUWP_et10x9a9vyk8t!App" -ArgumentList "C:\"

To find the app I use the following command

Get-StartApps | Where-Object { $_.Name -like "*Files*" }

Edit3

Just figured out about the Settings → Apps → Apps & Features → App execution aliases So as @Josh65-2201 mentioned below, my system has files-stable.exe registered as App execution alias when installed from the Microsoft store. That executable was automatically added to PATH. So now I can happily execute files-stable <path to folder>

The executables was added to path from: C:\Users\<username>\AppData\Local\Microsoft\WindowsApps folder.

weliwita avatar May 12 '25 03:05 weliwita

None of these have been implemented when they are this will be closed as complete. The only option right now is to open a path using files-<branch>.exe <path to folder> replacing <branch> with stable, preview or dev depending on what version you have installed.

Josh65-2201 avatar May 12 '25 10:05 Josh65-2201