<?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 Re: Copy File() Doesn't Overwrite in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34849#M20592</link>
    <description>&lt;P&gt;The save file functions do overwrite provided the target file is not being accessed by another program. Would a read file/write file JSL script allow your to overcome the current limitations of the copy file function?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2017 13:41:00 GMT</pubDate>
    <dc:creator>stephen_pearson</dc:creator>
    <dc:date>2017-01-23T13:41:00Z</dc:date>
    <item>
      <title>Copy File() Doesn't Overwrite</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/15593#M14275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just fyi, Copy File() does not appear to overwrite.&amp;nbsp; If the destination file already exists the log will show a zero instead.&amp;nbsp; There also does not appear to be any switch possible (e.g. 1 = overwrite, 0 = no overwrite).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm resorting to: Delete File() then Copy File() for cases where I want it to overwrite an existing destination file. &lt;/P&gt;&lt;P&gt;Just passing this along in case it help others.&amp;nbsp; I do appreciate these relatively new file utilities, they come in handy for sure. DJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 18:04:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/15593#M14275</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2015-11-23T18:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() Doesn't Overwrite</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/15594#M14276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;confirmed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=1,i&amp;lt;=2,i++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; text = "test" || char(i);&lt;/P&gt;&lt;P&gt;&amp;nbsp; save text file("C:\TEMP\test.txt", text);&lt;/P&gt;&lt;P&gt;&amp;nbsp; copy = copy file("C:\TEMP\test.txt", "C:\TEMP\test2.txt");&lt;/P&gt;&lt;P&gt;&amp;nbsp; print(copy);&lt;/P&gt;&lt;P&gt;&amp;nbsp; text2 = load text file("C:\TEMP\test.txt");&lt;/P&gt;&lt;P&gt;&amp;nbsp; text3 = load text file("C:\TEMP\test2.txt");&lt;/P&gt;&lt;P&gt;&amp;nbsp; print(text2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; print(text3);&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//log&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;"test1"&lt;/P&gt;&lt;P&gt;"test1"&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;"test2"&lt;/P&gt;&lt;P&gt;"test1"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 20:25:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/15594#M14276</guid>
      <dc:creator>msharp</dc:creator>
      <dc:date>2015-11-23T20:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() Doesn't Overwrite</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34729#M20510</link>
      <description>&lt;P&gt;I'm just bumping this up in case there's a solution.&amp;nbsp; Problem is, having to Delete File () prior to Copy File () can take a long time...in my case 10 sec and that's for a very small file size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone knows any tricks to make Copy File () overwrite a file if it exists, let me know!&amp;nbsp; thanks, DJ&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 16:19:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34729#M20510</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2017-01-19T16:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() Doesn't Overwrite</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34734#M20514</link>
      <description>&lt;P&gt;I do not have a solution, but I do want to encourage you to report the issue to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; support@jmp.com&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2017 17:26:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34734#M20514</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-19T17:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() Doesn't Overwrite</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34849#M20592</link>
      <description>&lt;P&gt;The save file functions do overwrite provided the target file is not being accessed by another program. Would a read file/write file JSL script allow your to overcome the current limitations of the copy file function?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:41:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-Doesn-t-Overwrite/m-p/34849#M20592</guid>
      <dc:creator>stephen_pearson</dc:creator>
      <dc:date>2017-01-23T13:41:00Z</dc:date>
    </item>
  </channel>
</rss>

