open a file with its default programme

前端 未结 6 1712
旧时难觅i
旧时难觅i 2021-01-23 10:40

In my application I want to open some files with the correct default programmes, like .doc file should be open with WORD and .psd files should be opened with Photoshop if it is

6条回答
  •  无人共我
    2021-01-23 11:31

    Invoke the system command 'open'. Works on Windows and Unix based clients.

    Depending on where your script runs, you might not be able to invoke system commands though, for instance in a browser sandbox.

提交回复
热议问题