<?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 get JMP to close pdf files that have been opened to extract information? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/702889#M88725</link>
    <description>&lt;P&gt;Since I am new to scripting, I just copied a script from a previous discussion (&lt;A href="https://community.jmp.com/t5/Discussions/Batch-processing-files-to-extract-data-into-a-summary-table/m-p/529021" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Batch-processing-files-to-extract-data-into-a-summary-table/m-p/529021&lt;/A&gt;) and slimmed it to the stuff I need - only the pdf file names.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
//point to file directory

path = Pick Directory( "Select Directory Containing Data Files" );

//Gets the list of files in the selected file folder
file_list = Files In Directory( path );

// Create beginnings of output data table
dtFinal = New Table( "Final", New Column( "File Name", Character ));

//i=0;open file
nfile_list = N Items( file_list );
For( i = 1, i &amp;lt;= nfile_list, i += 1, 
	//Set Current Directory( dir_DirectoryPath );
	dt = Open( path || file_list[i], );
		// Add information to Final data table
	dtFinal &amp;lt;&amp;lt; add rows( 1 );
	dtFinal:File Name[N Rows( dtFinal )] = file_list[i];
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I have about 750 pdf files which all open while running the script.&lt;/P&gt;&lt;P&gt;Does anybody know how to automatically close the pdf files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a heap for your help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Nov 2023 20:52:58 GMT</pubDate>
    <dc:creator>CalibrationBear</dc:creator>
    <dc:date>2023-11-26T20:52:58Z</dc:date>
    <item>
      <title>How do I get JMP to close pdf files that have been opened to extract information?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/702889#M88725</link>
      <description>&lt;P&gt;Since I am new to scripting, I just copied a script from a previous discussion (&lt;A href="https://community.jmp.com/t5/Discussions/Batch-processing-files-to-extract-data-into-a-summary-table/m-p/529021" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Batch-processing-files-to-extract-data-into-a-summary-table/m-p/529021&lt;/A&gt;) and slimmed it to the stuff I need - only the pdf file names.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
//point to file directory

path = Pick Directory( "Select Directory Containing Data Files" );

//Gets the list of files in the selected file folder
file_list = Files In Directory( path );

// Create beginnings of output data table
dtFinal = New Table( "Final", New Column( "File Name", Character ));

//i=0;open file
nfile_list = N Items( file_list );
For( i = 1, i &amp;lt;= nfile_list, i += 1, 
	//Set Current Directory( dir_DirectoryPath );
	dt = Open( path || file_list[i], );
		// Add information to Final data table
	dtFinal &amp;lt;&amp;lt; add rows( 1 );
	dtFinal:File Name[N Rows( dtFinal )] = file_list[i];
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unfortunately, I have about 750 pdf files which all open while running the script.&lt;/P&gt;&lt;P&gt;Does anybody know how to automatically close the pdf files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a heap for your help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Nov 2023 20:52:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/702889#M88725</guid>
      <dc:creator>CalibrationBear</dc:creator>
      <dc:date>2023-11-26T20:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get JMP to close pdf files that have been opened to extract information?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/703303#M88760</link>
      <description>&lt;P&gt;It doesn't look like there's any need to open those pdfs in the first place, since all your script is doing is putting a filename in each row of :File Name.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
//point to file directory

path = Pick Directory( "Select Directory Containing Data Files" );

//Gets the list of files in the selected file folder
file_list = Files In Directory( path );

// Create beginnings of output data table
dtFinal = New Table( "Final", New Column( "File Name", Character ) );

//i=0;open file
nfile_list = N Items( file_list );
For( i = 1, i &amp;lt;= nfile_list, i += 1, 
	//Set Current Directory( dir_DirectoryPath );
	//dt = Open( path || file_list[i], );
		// Add information to Final data table
	dtFinal &amp;lt;&amp;lt; add rows( 1 );
	dtFinal:File Name[N Rows( dtFinal )] = file_list[i];
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you could do it even quicker and more efficiently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
path = Pick Directory( "Select Directory Containing Data Files" );
dtFinal = New Table( "Final", New Column( "File Name", Character, Set Values( Files In Directory( path ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Nov 2023 17:46:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/703303#M88760</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-11-27T17:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get JMP to close pdf files that have been opened to extract information?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/704430#M88856</link>
      <description>&lt;P&gt;Thank you so much for helping me on this issue.&lt;/P&gt;&lt;P&gt;Much simpler and exactly what I wanted.&lt;/P&gt;&lt;P&gt;Happy to be in this community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 19:11:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-get-JMP-to-close-pdf-files-that-have-been-opened-to/m-p/704430#M88856</guid>
      <dc:creator>CalibrationBear</dc:creator>
      <dc:date>2023-11-30T19:11:09Z</dc:date>
    </item>
  </channel>
</rss>

