tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/2835-python-how-to-get-the-directory-of-the-current-moneydance-datasetInfinite Kind: Discussion 2020-09-17T10:50:23Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/484100442020-06-17T21:06:09Z2020-06-17T21:06:09ZPython... How to get the directory of the current moneydance dataset<div><p>Oh yes! The python variable <code>moneydance_data</code> refers to the current data set, and you can call .getRootFolder() on it to get a java File object which refers to the path. So .getRootFolder().getAbsolutePath() will return a string with the full path to the data file.</p>
<p>Thanks,<br>
Sean</p>
<p>--<br>
Sean Reilly<br>
Developer, The Infinite Kind<br>
<a href="https://infinitekind.com">https://infinitekind.com</a></p></div>Sean Reillytag:infinitekind.tenderapp.com,2009-01-14:Comment/484100442020-06-18T10:43:07Z2020-06-18T10:43:07ZPython... How to get the directory of the current moneydance dataset<div><p>Thanks Sean. Interestingly, they both return the same value:</p>
<p>print moneydance_data.getRootFolder()<br>
print moneydance_data.getRootFolder().getAbsolutePath()<br>
= the full path and filename of the MD Datafile (i.e. not just the path)..</p>
<p>?</p>
<p>Regards</p></div>Stuart Beesley (Mr Toolbox)tag:infinitekind.tenderapp.com,2009-01-14:Comment/484100442020-06-18T10:49:50Z2020-06-18T10:49:50ZPython... How to get the directory of the current moneydance dataset<div><p>PS - moneydance_data.getRootFolder().getParent() seems to get the MD Folder?</p>
<p>Regards</p>
<p>On 18 Jun 2020, at 11:42, Stuart Beesley <a href="mailto:sbeesley@gmail.com">sbeesley@gmail.com</a> wrote:</p>
<p>Thanks Sean. Interestingly, they both return the same value:</p>
<p>print moneydance_data.getRootFolder()<br>
print moneydance_data.getRootFolder().getAbsolutePath()<br>
= the full path and filename of the MD Datafile (i.e. not just the path)..</p>
<p>?</p>
<p>Regards</p></div>Stuart Beesley (Mr Toolbox)