select all from folder and open with application

Asked by deven

I have finder opening a folder and selecting all the items. Now I am after a command that will open all those files with safari in new tabs / windows
default program at the moment is Chrome so needs to be open with

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

This should do what you want, without touching any Sikuli feature:

import os
dir = "/Users/raimundhocke/Desktop/Test"
os.popen("cd %s; open -a Safari.app *.*"%dir)

This opens all files in the folder specified by dir (replace with the absolute path to your folder) using Safari.

Can you help with this problem?

Provide an answer of your own, or ask deven for more information if necessary.

To post a message you must log in.