Copy link to clipboard
Copied
Hi everyone,
currently I'm a bit stuck trying to find a clean and efficient way to determine and re-map a Windows drive letter to a Mac OS path, e.g.
"file://localhost/D:/Media/Card01/Clip01.mov" should end up as "file://localhost/Volumes/VideoDrive/Media/Card01/Clip01.mov" (if VideoDrive is the D: volume name).
I tried wmic which fails because it seems that I can only pass 2 arguments to window.cep.createProcess() where in this case I would need 4 (cmd line is "wmic logicalvolume get caption,volumename") --- which is a bit strange b/c the createProcess header does not suggest the argument count was limited to 2, but maybe the implementation is (?). (Of course I could use less parameters for wmic, but then I'd have to do a lot of filtering to get what I need. Not an option.)
The other approach was to use create.process.stdin(pID,'vol\ D:') after creating a cmd.exe process, but there I wasn't able to catch the respective stdout (only returns the initial cmd stdout).
Any ideas? Hint: I need to solve this without using node.js or other "3rd party" framworks.
Cheers.
Copy link to clipboard
Copied
For now I've solved this using the not-an-option option: wmic with only two parameters, parsing the result down to a map. About 25 lines of code, so it's not as bad as expected.