Mkdir failed on windows

gutiersa wrote on Sunday, May 18, 2008:

I have
Windows XP home
XAMPP
openemr 2.8.3

when I go to fax/scan -> scanner In, and click on dispatch, I get this error message:

mkdir returned 1:

when I try to run the command directly from the command prompt, I get this:

C:>mkdir F:\Program Files\xampp\htdocs\openemr\faxcache\scan
A subdirectory or file F:\Program already exists.
Error occurred while processing: F:\Program.
A subdirectory or file Files\xampp\htdocs\openemr\faxcache\scan already exists.
Error occurred while processing: Files\xampp\htdocs\openemr\faxcache\scan.

If I try to create a test folder, I am able to do so:

C:>mkdir F:\this\is\a\test

C:>

but there are no spaces in the latter directories.

Do I have to reinstall XAMPP directly in F:\XAMPP or is there another way around this problem??

hadrins wrote on Sunday, May 18, 2008:

You may get this response twice.

When there is a space in the path you have to use quotes. Make it a habit.
example
C:>mkdir "F:\Program Files\xampp\htdocs\openemr\faxcache\scan"

There are two other possible ways around this.

C:>mkdir F:\Progra~1\xampp\htdocs\openemr\faxcache\scan
and
C:>mkdir "%programfiles%\xampp\htdocs\openemr\faxcache\scan"

I would recommend using quotes.

gutiersa wrote on Monday, May 19, 2008:

Thanks a lot Adrin!

making the changes above to the command worked, I opted for using

webserver_root = "F:\Progra~1\xampp\htdocs\openemr";

in globals, however, I still had to change this line:

$faxcache = "$webserver_root\\faxcache\$mode\$filebase";

and remove the single quotes from ‘$faxcache’ here:

$tmp0 = exec("mkdir -p $faxcache", $tmp1, $tmp2);

Now the "Dispatch received document" window opens, but after a second click on the file. The first click generates the "mkdir returned 1:" error message.

In addition I’m still not getting anything listed under the “Please select the desired pages to copy or forward:” title. And if I click on “Copy Pages to Patient Chart”, select the patient name, and click OK, I get the "no pages selected error. The files are mostly pdf files, and tif files.