cxcalc fails at wildcard

User bfa236fdb0

12-03-2015 10:10:12

Dear support,


 


I am running MarvinBeans 15.3.9.0 on Academic license, Windows 7 64 bit, and recently my cxcalc function has stopped working with wildcards from a .bat file. Previously, I had code that allowed computation on 40 compounds in a subfolder in my drive. I am by no means a coding expert, but it worked. But now, it doesn't work any more and I cannot figure out why.


It stopped working in the trend that it no longer allows wildcards to use all files in a folder for calculation, rather it returns the path as error. The bat file is located in the same folder in which the output is written, and the molecular structures are stored in a subfolder called "marv files".


The code looks something like this:


@ECHO OFF
cd /d "C:\Program Files (x86)\ChemAxon\MarvinBeans\bin"
cxcalc -o "M:\Folder1\Folder11\Computed.txt" ^
name -t traditional ^
exactmass ^
etc...
"M:\Folder1\Folder11\marv files\\"*.mrv

This script worked fine until a few weeks ago. Now, executing this code causes the error: 


M:\Folder1\Folder11\marv files\*.mrv (The filename, directory name, or volume label syntax is incorrect)


But, when simply changing the asterix to a real filename, it works perfect without any errors


@ECHO OFF
cd /d "C:\Program Files (x86)\ChemAxon\MarvinBeans\bin"
name -t traditional ^
exactmass ^
etc...
"M:\Folder1\Folder11\marv files\\"Benzophenone.mrv

id	Traditional Name	Exact mass	
1 benzophenone 182,07316494

Even putting the .mrv files in the cxcalc folder (the ChemAxon main directory on Program Files) and launching a .bat from that folder works fine, so it must be a pathname error somewhere that doesn't allow the plugin to read the location.

Test .mrv files in folder:
"C:\Program Files (x86)\ChemAxon\MarvinBeans\bin\2,6-Diisopropylnaphthalene.mrv"
"C:\Program Files (x86)\ChemAxon\MarvinBeans\bin\2-dodecylbenzene-1-sulfonate.mrv"
"C:\Program Files (x86)\ChemAxon\MarvinBeans\bin\2,4,5,6-tetrachloro-isophthalonitrile.mrv"
.bat file:
@ECHO OFF
cxcalc -g -o result.txt ^
name -t traditional ^
exactmass ^
*.mrv

Result:
id Traditional Name Exact mass
1 chlorothalonil 263,8815588
2 DIPN 212,1565006440
3 sodium 2-dodecylbenzenesulfonate 348,17351025



To conclude it works perfectly when the cxcalc is run in the same folder as the files, and then wildcards do work!

So I really don't know why this fails suddenly, as it has always worked perfectly. Is there a major overlook on my account?




Hope you can help or provide some insights on this




Kind regards,
Eelco


EDIT:

Well I found that switching the directories around gets the code to work again. Still it's not the most optimal solution and doesn't solve my mystery. Solution involved setting:


cd /d "M:\Folder1\Folder11\marv files\\"

<code>

*.mrv


But calling cxcalc from its original location (full path name).

ChemAxon d51151248d

02-06-2015 13:44:04

Hi Eelco, 


Sorry for the late answer. We are going to investigate your issue further and get back to you once we had an answer for it. 


Best regards, 


Daniel