<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I select files and create the pathway to it as a string? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18212#M16610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a function that enables me to pick multiple files, retrive the local pathway to them and then store this pathway as a string in order to import them to JMP.&lt;/P&gt;&lt;P&gt;dtname = {};&lt;/P&gt;&lt;P&gt;dt.file = Pick File (...);&lt;/P&gt;&lt;P&gt;//select the dir.&lt;/P&gt;&lt;P&gt;path = &lt;SPAN style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Pick Directory&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Consolas; font-size: 10pt;"&gt;"Select a directory."&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (i=1, i&amp;lt;= N Items(dt.file), i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//String of my file name&lt;/P&gt;&lt;P&gt;dtname&lt;I&gt; = dt.file &lt;I&gt; &amp;lt;&amp;lt; Get Name ;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open (&lt;/P&gt;&lt;P&gt;path||"\"||dtname&lt;I&gt;,&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//the import settings should predefine which row is header, new column etc.&lt;/P&gt;&lt;P&gt;Import Settings&lt;STRONG&gt;(..)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when executing this I get a return message that says "Send Expects Scriptable Object in access or evaluation of 'List*...."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Do I have to eval my dt.file = Pick File (...); function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2016 09:25:44 GMT</pubDate>
    <dc:creator>anders_bankefor</dc:creator>
    <dc:date>2016-04-26T09:25:44Z</dc:date>
    <item>
      <title>How do I select files and create the pathway to it as a string?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18212#M16610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a function that enables me to pick multiple files, retrive the local pathway to them and then store this pathway as a string in order to import them to JMP.&lt;/P&gt;&lt;P&gt;dtname = {};&lt;/P&gt;&lt;P&gt;dt.file = Pick File (...);&lt;/P&gt;&lt;P&gt;//select the dir.&lt;/P&gt;&lt;P&gt;path = &lt;SPAN style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Pick Directory&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: Consolas; font-size: 10pt;"&gt;"Select a directory."&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (i=1, i&amp;lt;= N Items(dt.file), i++,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//String of my file name&lt;/P&gt;&lt;P&gt;dtname&lt;I&gt; = dt.file &lt;I&gt; &amp;lt;&amp;lt; Get Name ;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open (&lt;/P&gt;&lt;P&gt;path||"\"||dtname&lt;I&gt;,&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//the import settings should predefine which row is header, new column etc.&lt;/P&gt;&lt;P&gt;Import Settings&lt;STRONG&gt;(..)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when executing this I get a return message that says "Send Expects Scriptable Object in access or evaluation of 'List*...."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Do I have to eval my dt.file = Pick File (...); function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 09:25:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18212#M16610</guid>
      <dc:creator>anders_bankefor</dc:creator>
      <dc:date>2016-04-26T09:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I select files and create the pathway to it as a string?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18213#M16611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pick File() by default returns file name, including the path to the file, as a string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;dt.file &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Pick File&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Open&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt.file&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 10:29:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18213#M16611</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2016-04-26T10:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I select files and create the pathway to it as a string?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18214#M16612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MS and thank you for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes this is exactly what I thought since I can use dt.file &amp;lt;&amp;lt; Get Name;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can see now that I've made an error in my discussion, dt.file should be a list so that I may stack several csv files. Therefore I need to iterate/recursively go through the list and import the excel file to JMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, I would like to use "import settings(...)" to predefine the parameters for importing data to JMP, if I use open I have to define these parameters manually for each file that I import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've corrected my original post and I look forward to your reply.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 12:28:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18214#M16612</guid>
      <dc:creator>anders_bankefor</dc:creator>
      <dc:date>2016-04-26T12:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I select files and create the pathway to it as a string?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18215#M16613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can open multiple files with pick file().&amp;nbsp; You can also specify the excel import options right in open().&amp;nbsp; Look at Open() in the Scripting Index, example 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;file &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Pick File&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Pick a file"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"$DOCUMENTS"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Excel|csv;xlsx;xls"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"JMP Files|jmp;jsl;jrn"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"All Files|*"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;}&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; multiple&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;For&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;nitems&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;file&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Open&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;file&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: green;"&gt;/*excel options ie: ,Table Contains Column Headers( 1 ), Column Names are on line (3), ect.*/&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 15:56:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-select-files-and-create-the-pathway-to-it-as-a-string/m-p/18215#M16613</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2016-04-26T15:56:56Z</dc:date>
    </item>
  </channel>
</rss>

