【发布时间】:2017-08-17 18:27:12
【问题描述】:
我不知道为什么我无法在 Node.js 中打开“我的文档”的子目录。
我当前的代码:
function fileExplorer() {
var spawn = require('child_process').spawn,
child = spawn('C:\\Windows\\explorer.exe',
["%userprofile%\\documents"]);
}
完全可以启动用户的“我的文档”文件夹。但是,如果我想在“我的文档”中打开一个目录,比如说“我的文档/其他内容”,则以下内容不起作用:
function fileExplorer() {
var spawn = require('child_process').spawn,
child = spawn('C:\\Windows\\explorer.exe',
["%userprofile%\\documents\\extra stuff"]);
}
我错过了什么?如果我的问题有问题,请原谅我,我有一个面向设计的大脑,并且更熟悉 HTML、CSS 和一些 Javascript。
【问题讨论】:
标签: javascript node.js node-webkit