<?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 get file size in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7695#M7689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JMP 10.0.0 with Windows 7, and would like to use JSL to determine a file size in bytes given a file path. Here is an example structure of what I am trying to achieve, where in JMP 10.0.0 'file size()' is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f_path=pick file();&lt;/P&gt;&lt;P&gt;f_size=file size(f_path);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a method to determine the file size without openning or loading the file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Nov 2013 13:22:43 GMT</pubDate>
    <dc:creator>wiebepo</dc:creator>
    <dc:date>2013-11-03T13:22:43Z</dc:date>
    <item>
      <title>get file size</title>
      <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7695#M7689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JMP 10.0.0 with Windows 7, and would like to use JSL to determine a file size in bytes given a file path. Here is an example structure of what I am trying to achieve, where in JMP 10.0.0 'file size()' is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f_path=pick file();&lt;/P&gt;&lt;P&gt;f_size=file size(f_path);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a method to determine the file size without openning or loading the file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Nov 2013 13:22:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7695#M7689</guid>
      <dc:creator>wiebepo</dc:creator>
      <dc:date>2013-11-03T13:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: get file size</title>
      <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7696#M7690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The File Size() function is available in JMP 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a modification of a portion of the script "2_Extra_MSDirUsingWeb.jsl" from chapter 2 of the book "JSL Companion Applications of the JMP Scripting Language."&amp;nbsp; It is a kludged solution that works for Windows only.&amp;nbsp; Note, the script is a bit wordy and has extra commands to demonstrate the functions and output.&amp;nbsp; The full script describes the syntax of the MS DOS dir command. &lt;/P&gt;&lt;P&gt;==========================================================================================================&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// cmd_dir is the command to get a listing of JMP sample data &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// c:\temp\jmpDir.bat is the command file to run&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// c:\temp\dirOut.txt is the file of results from the dir command&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;batFid &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"c:\temp\jmpDir.bat"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;outDir &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"c:\temp\dirOut.txt"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Get the full path for a file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;f_path0&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;pick file&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;f_path &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Convert File Path&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; f_path&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; Windows &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Build the DOS "dir" command&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cmd_txt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"\[dir /-C /T:C /S "]\"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; f_path &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"\[" &amp;gt; ]\"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; outDir&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;show&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;cmd_txt&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Save to a file with a .bat extension.&amp;nbsp; Windows interprets .bat files &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// the same as the Run (run command) window on the Start Button&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Save Text File&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; batFid&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; cmd_txt &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Windows interprets this&amp;nbsp; "open" path file as "run"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;t0 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Today&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Web&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; batFid &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Wait a second for Windows to complete, maybe more if a huge directory. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Note the wait is the only control you have and then look to see if the file exists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Show results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// A couple of "checks" that you may employ here if it does not exist or if it is older than expected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;!&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;File Exists&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; outDir &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Creation Date&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; outDir &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; t0 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Caption&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"There was a problem with the dir command, it did not run. Aborting..."&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Caption&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Remove&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Throw&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;()&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;_crlf &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"\!N"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_results &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;words&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Load Text File&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;outDir&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;_crlf&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_size_str &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;words&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_results&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;nitems&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_results&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;-&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;])&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;f_size &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;num&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_size_str&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; font-size: 10pt;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;])&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;show&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_size_str&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; f_size&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;//number of bytes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;//=============================================================================&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;//the command below createsa file that shows the results of the DOS dir command that was used&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// Open the results file&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;dir_dt &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;Open&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outDir&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns&lt;STRONG&gt;(&lt;/STRONG&gt; Name&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"Dir results"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; Character &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Import Settings&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Of Line&lt;STRONG&gt;(&lt;/STRONG&gt; CRLF &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Of Field&lt;STRONG&gt;(&lt;/STRONG&gt; CRLF &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: green; font-size: 10pt;"&gt;// ensures only 1 column&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Strip Quotes&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use Apostrophe as Quotation Mark&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scan Whole File&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Treat empty columns as numeric&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Labels&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data Starts&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lines To Read&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #0000dd; font-size: 10pt;"&gt;All&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year Rule&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; font-size: 10pt;"&gt;"10-90"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: navy; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 17:23:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7696#M7690</guid>
      <dc:creator>gzm</dc:creator>
      <dc:date>2013-11-04T17:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: get file size</title>
      <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7697#M7691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have R installed this should work (only tested in JMP 10 for Mac):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;R Init&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;mypath &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 style="font-size: 12px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #032ce4;"&gt;R Execute&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;mypath&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;x&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"x &amp;lt;- file.info(mypath)$size"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;Show&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; x &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;R Term&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 18:22:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7697#M7691</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-11-04T18:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: get file size</title>
      <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7698#M7692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice one with R function, MS!&lt;/P&gt;&lt;P&gt;For Windows, here is the hard way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// filesize.jsl&lt;/P&gt;&lt;P&gt;fname = "c:/temp/bubble.jpg";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//******************************************&lt;/P&gt;&lt;P&gt;// with JMP version 11&lt;/P&gt;&lt;P&gt;rc = if(host is(Windows) &amp;amp; JMP Version()=="11.0.0",&lt;/P&gt;&lt;P&gt;&amp;nbsp; fs = File Size(fname); &lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//******************************************&lt;/P&gt;&lt;P&gt;// with R file.info {base}&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://stat.ethz.ch/R-manual/R-devel/library/base/html/file.info.html"&gt;http://stat.ethz.ch/R-manual/R-devel/library/base/html/file.info.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;// returns a data frame with various file info, is a dir?, times, IDs, etc.;&lt;/P&gt;&lt;P&gt;R Init();&lt;/P&gt;&lt;P&gt;R Send(fname);&lt;/P&gt;&lt;P&gt;R submit("\[&lt;/P&gt;&lt;P&gt;&amp;nbsp; df = file.info(fname);&lt;/P&gt;&lt;P&gt;]\");&lt;/P&gt;&lt;P&gt;fs = R get(df$size);&lt;/P&gt;&lt;P&gt;show(fs);&amp;nbsp;&amp;nbsp; // in KB;&lt;/P&gt;&lt;P&gt;R Term();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//******************************************&lt;/P&gt;&lt;P&gt;// or, the hard way&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364955(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/aa364955(v=vs.85).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364957(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/aa364957(v=vs.85).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;kernel32 = Load DLL( "kernel32" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use createfile to retrive a reference to a file, i.e. a file handle&lt;/P&gt;&lt;P&gt;kernel32 &amp;lt;&amp;lt; DeclareFunction( "CreateFileA", Convention( STDCALL ), Alias( "CreateFile" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( AnsiString( 256 ), "lpFileName" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "dwDesiredAccess" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "dwShareMode" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( IntPtr, "lpSecurityAttributes" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "dwCreationDisposition" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "dwFlagsAndAttributes" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( UIntPtr, "hTemplateFile" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Returns( Int32 )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;open_existing = 3;&lt;/P&gt;&lt;P&gt;hFile = kernel32 &amp;lt;&amp;lt; CreateFile( fname, 0, 0, 0, open_existing, 0, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// GetFileSize requires file handle (from above)&lt;/P&gt;&lt;P&gt;kernel32 &amp;lt;&amp;lt; DeclareFunction( "GetFileSizeEx", Convention( STDCALL ), Alias( "GetFileSizeEx" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "hFile" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "lpFileSize", update&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Returns( Int32 )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;fs = 0;&lt;/P&gt;&lt;P&gt;rc =&amp;nbsp; kernel32 &amp;lt;&amp;lt; GetFileSizeEx( hFile, fs );&lt;/P&gt;&lt;P&gt;show(fs);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// clean up&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/desktop/ms724211(v=vs.85).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;kernel32 &amp;lt;&amp;lt; DeclareFunction( "CloseHandle", Convention( STDCALL ), Alias( "CloseHandle" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Arg( Int32, "hFile" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Returns( Int32 )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;rc =&amp;nbsp; kernel32 &amp;lt;&amp;lt; CloseHandle( hFile );&lt;/P&gt;&lt;P&gt;kernel32 &amp;lt;&amp;lt; Unload DLL();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,-Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 22:56:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7698#M7692</guid>
      <dc:creator>mattflynn</dc:creator>
      <dc:date>2013-11-04T22:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: get file size</title>
      <link>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7699#M7693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for all the responses.Declaring a function using the kernel32 dll works best for my application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 00:43:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-file-size/m-p/7699#M7693</guid>
      <dc:creator>wiebepo</dc:creator>
      <dc:date>2013-11-05T00:43:19Z</dc:date>
    </item>
  </channel>
</rss>

