how to open a file in windows, from Pharo environment?

56 views Asked by At

I'm building something in Smalltalk and I need to open files in the underlying OS (Windows 10). Specifically, I need to open certain types of files with the registered Windows app (.pdf, .wav, etc.), as well as the explorer. I'm lost - can't find the way to do it or the classes that deal with it. Can you give me a clue?

I loaded Pharo-OS-Windows. It seems not to work in my computer. Things like WinShell shellOpen: 'c:\pharo.pdf' produce no visible result.

I tried to load OSProcess, but it seems to be outdated (it works with a deprecated file system, as far as I could understand)

PS: please take into account that I'm a beginner and an amateur.

1

There are 1 answers

0
Sanjay Minni On

if you still have not for that working try: OSWSWinProcess new shellCommand: 'c:\pharo.pdf'. download OSWinSubprocess from: https://github.com/pharo-contributions/OSWinSubprocess