-
Launch Automator
-
Create New Document
-
Create a new Quick Action (Select "Quick Action")
-
Add the Action Workflow receives
current files or foldersinFinder -
If desired, add custom image/icon (see comment below)
-
Add a new
Run Shell Scriptaction to the workflow. -
Configure the Workflow
-
Set the
Pass Inputto beas arguments -
Paste the following in the input box:
open -n -b "com.microsoft.VSCode" --args "$*"
-
-
Save the action using a name like
Open In Visual Studio Code -
If icon does not show, relaunch Finder: hold
cmd+opt+right-clickFinder icon > relaunch
Right-click a file or folder, find your newly created task under Quick Actions
Ref: https://stackoverflow.com/questions/64040393/open-a-folder-in-vscode-through-finder-in-macos
Custom icon
/path/to/icon.png