Skip to main content
Known Participant
May 13, 2019
Answered

window.cep.fs.makedir Fails With UNC Path on Windows

  • May 13, 2019
  • 2 replies
  • 1118 views

Hi all,

I develop InDesign CC Extensions.

I have used window.cep.fs.makedir() frequently with no problem. However, I was always using Windows paths ("c:\mydir\myfile.txt") - of course with "\" converted to "/".

For the first time, I have to deal with UNC paths ("\\myhost\myshare\mydir\). window.cep.fs.makedir is failing at creating new dirs with UNC paths (regular Windows paths work fine). writefile and readfile both work fine with UNC.

For example, window.cep.fs.makedir('//myhost/myshare/mydir/newdir') fails, even though '//myhost/myshare/mydir/' exists already.

Could someone please help me?

TIA,

mlavie

This topic has been closed for replies.
Correct answer mslavie

Solved.

For whatever reason, on Windows, window.cep.fs.makedir wants backslashes ("\") instead of slashes ("/").

Go figure.

mlavie

2 replies

Inspiring
December 9, 2020

That could be a bit offtopic, but how did you manage to handle windows paths? The `onEncoderJobComplete` path callback in Windows it s the one with single `\` which blocks me from reading the file after the encoder is done. Thank you

mslavie
mslavieCorrect answer
New Participant
May 16, 2019

Solved.

For whatever reason, on Windows, window.cep.fs.makedir wants backslashes ("\") instead of slashes ("/").

Go figure.

mlavie