Thursday, 12 September 2013

Issuing cmd-like commands in Node.js

Issuing cmd-like commands in Node.js

I was wondering if its possible to open files in their default viewer
using node.js
For instance, I can open a jpg on the command line by simply navigating to
the directory and then typing the filename:
C:\Users\Fermion>sample.jpg
will open the sample.jpg file in Windows Photo Viewer.
Is it possible to write a JavaScript script that will issue the same
command and run it using Node? If so, how?

No comments:

Post a Comment