<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/products/administration/f/product-administration-forum/207636/is-it-possible-to-check-in-a-cfg-file-if-d-ms_connect-exists-and-if-not-check-if-c-ms-connect-exists-and-put-the-following-variable-ms_data_hoorn-to-that-path</link><description>Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/629616?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 09:32:13 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3ac68b28-b40a-4f45-a1d0-41f2b8ae4be3</guid><dc:creator>Nico Caspel</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Jan thanks it works.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626196?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2020 07:45:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8deaa584-4b47-4126-8e39-605464e37b4d</guid><dc:creator>Nico Caspel</dc:creator><description>&lt;p&gt;Hi Jan thanks it works.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626185?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2020 06:23:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c7df07f9-ca62-42b2-95ea-902428959f49</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Nico,&lt;/p&gt;
&lt;p&gt;as Mary wrote: Did you bother to study documentation Mary linked? Plus, did you try to use Search? The same question was discussed many times already (both for folders and files), so answer is available already (e.g. &lt;a href="/products/administration/f/product-administration-forum/105832/if-exists-expressions-in-pcf-files/318884#318884" rel="noopener noreferrer" target="_blank"&gt;this one&lt;/a&gt;).&lt;/p&gt;
[quote userid="15485" url="~/products/administration/f/product-administration-forum/207636/is-it-possible-to-check-in-a-cfg-file-if-d-ms_connect-exists-and-if-not-check-if-c-ms-connect-exists-and-put-the-following-variable-ms_data_hoorn-to-that-path/626142"]I want to test in a cfg file if there is a D: / ms_connect directory[/quote]
&lt;p&gt;Why did you choose to do not follow standards and to use syntax not used anywhere? It&amp;#39;s like a decision &amp;quot;I want to create something confusing and annoying.&amp;quot; We are on Windows, so a file path consists from backslashes, plus no spaces exists around a drive specification. So why you simply do not write D:\ms_connect\? Or, when you prefer to use style used in MicroStation configuration files (which is also perfectly fine), to write D:/ms_connect/?&lt;/p&gt;
&lt;p&gt;Also, it&amp;#39;s recommended to use ending backslash, when folder is specified, because from C:\ms_connect it&amp;#39;s not clear whether it&amp;#39;s folder or file (with no extension), whereas when C:\ms_connect\ is used, it&amp;#39;s clear.&lt;/p&gt;
[quote userid="15485" url="~/products/administration/f/product-administration-forum/207636/is-it-possible-to-check-in-a-cfg-file-if-d-ms_connect-exists-and-if-not-check-if-c-ms-connect-exists-and-put-the-following-variable-ms_data_hoorn-to-that-path/626142"]then ms_data_hoorn = D: / ms_connect must be set and if it is not there, it must be checked whether c: / ms_connect exists. if yes then ms_data_hoorn = C: / ms_connect must be set.[/quote]
&lt;p&gt;Your (pseudo)code does something different. I do not see any test whether C:\ms_connect\ exists or not.&lt;/p&gt;
&lt;p&gt;I guess this should work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;%if exists(D:/ms_connect/)
  ms_data_horn = D:/ms_connect/
%elif exists (C:/ms_connect/)
  ms_data_horn = C:/ms_connect/
%endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626145?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 22:59:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e78a45f4-b031-479c-97ad-bd12b62ac16f</guid><dc:creator>MaryB</dc:creator><description>&lt;p&gt;This is absolutely possible. Did you read the link I sent about operatives?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626142?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 20:49:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:db29501f-883a-432e-9868-d784d858b378</guid><dc:creator>Nico Caspel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;ms_connect is a directory with organization data and therefore exists on the D: or on the C: drive.&lt;/p&gt;
&lt;p&gt;I want to test in a cfg file if there is a D: / ms_connect directory. If so, then ms_data_hoorn = D: / ms_connect must be set and if it is not there, it must be checked whether c: / ms_connect exists. if yes then ms_data_hoorn = C: / ms_connect must be set.&lt;/p&gt;
&lt;p&gt;if exists d: / ms_connect&lt;br /&gt;set ms_data_horn = D: / ms_connect&lt;br /&gt;else ms_data_horn = C: / ms_connect&lt;br /&gt;or something&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626127?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 18:14:05 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b40aeb1e-c9b9-43e7-b48b-89d4f0d6a339</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Nico,&lt;/p&gt;
[quote userid="15485" url="~/products/administration/f/product-administration-forum/207636/is-it-possible-to-check-in-a-cfg-file-if-d-ms_connect-exists-and-if-not-check-if-c-ms-connect-exists-and-put-the-following-variable-ms_data_hoorn-to-that-path"]Is it possible to check in a cfg file if d: / MS_connect exists[/quote]
&lt;p&gt;In addition to Mary&amp;#39;s answer: I am not sure what do you mean by d: / MS_connect, because it&amp;#39;s not valid Windows path, and also it&amp;#39;s not clear whether it&amp;#39;s folder or file.&lt;/p&gt;
&lt;p&gt;But I agree with Mary that the linked help page is the place where you should start.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to check in a cfg file if d: / MS_connect exists and if not check if c: / MS-connect exists and put the following variable MS_DATA_HOORN to that path?</title><link>https://communities.bentley.com/thread/626112?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 16:34:15 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:60662985-287d-4329-8328-fee517a6fb6a</guid><dc:creator>MaryB</dc:creator><description>&lt;p&gt;&lt;span&gt;Yes. Here&amp;#39;s a link to the&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v17/en/GUID-4B1D4DEF-A362-9896-05C3-D487EF7346C7.html"&gt;Online Help&lt;/a&gt;&lt;span&gt;&amp;nbsp;about this.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>