<?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 Copy File() - network dest doesn't work in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372823#M62273</link>
    <description>&lt;P&gt;Any reason why the below example won't work?&amp;nbsp; I get zero for the return, which means the file didn't copy and I can see that it didn't copy.&amp;nbsp; I can manually copy it fine via Windows 10.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: does JSL File Copy() not like UNC (I think) network destinations perhaps?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Copy File(
    "\\mywork1.work.com\folder1\source\test1.csv",
    "\\mywork2.work.com\folder2\dest\test1.csv"
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File Copy() seems to work fine elsewhere, even if the source is a UNC network path.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:10:03 GMT</pubDate>
    <dc:creator>djhanson</dc:creator>
    <dc:date>2023-06-09T22:10:03Z</dc:date>
    <item>
      <title>Copy File() - network dest doesn't work</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372823#M62273</link>
      <description>&lt;P&gt;Any reason why the below example won't work?&amp;nbsp; I get zero for the return, which means the file didn't copy and I can see that it didn't copy.&amp;nbsp; I can manually copy it fine via Windows 10.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: does JSL File Copy() not like UNC (I think) network destinations perhaps?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Copy File(
    "\\mywork1.work.com\folder1\source\test1.csv",
    "\\mywork2.work.com\folder2\dest\test1.csv"
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File Copy() seems to work fine elsewhere, even if the source is a UNC network path.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:10:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372823#M62273</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2023-06-09T22:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() - network dest doesn't work</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372827#M62274</link>
      <description>* meant Copy File() here</description>
      <pubDate>Tue, 30 Mar 2021 21:02:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372827#M62274</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2021-03-30T21:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copy File() - network dest doesn't work</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372835#M62276</link>
      <description>&lt;P&gt;Ok, I just discovered the fix.&amp;nbsp; In order to copy to a network dest (UNC), you must first delete the dest file if it already exists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Delete File( "\\mywork2.work.com\folder2\dest\test1.csv" );

Copy File(
    "\\mywork1.work.com\folder1\source\test1.csv",
    "\\mywork2.work.com\folder2\dest\test1.csv"
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you don't first delete out any existing file, presumably as it has to overwrite it, it will not execute the copy.&amp;nbsp; I don't know if it's possible in the future to put a switch or variable in the Copy File() like overwrite ("Y" or "N").&amp;nbsp; That would make this a little more obvious probably.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 12:02:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-File-network-dest-doesn-t-work/m-p/372835#M62276</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2021-03-31T12:02:23Z</dc:date>
    </item>
  </channel>
</rss>

