<?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 the file created by GpService in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/get-the-file-created-by-gpservice/m-p/1634543#M1421</link>
    <description>&lt;P&gt;I have a GpService that create a shape file.&lt;/P&gt;&lt;P&gt;In my code I am writing this file to&amp;nbsp;&lt;SPAN&gt;%scratchFolder%\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is created in this directory (as it should):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\disk1\arcgisserver\directories\arcgisjobs\agritest_gpserver\1234\scratch\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where the 1234 is the job number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can use the&amp;nbsp;%scratchFolder%\aaa.shp in my code after is it created (Describe or read it by cursor).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to use this file in the calling program so I return the&amp;nbsp;%scratchFolder%\aaa.shp as an output parameter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The path that I get is:&amp;nbsp;C:\Users\arcgis\AppData\Local\Temp\agritest_gpserver\1234\scratch\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where arcgis is the owner of the Enterprise and 1234 is the same job number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This dir exists on the server but it is empty. It looks like it created there temporary and was transferred to the jobs directory after the service ended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any way to get the job directory in the code of the gp service so I can return the correct directory?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 13:54:00 GMT</pubDate>
    <dc:creator>ModyBuchbinder</dc:creator>
    <dc:date>2025-07-21T13:54:00Z</dc:date>
    <item>
      <title>Get the file created by GpService</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/get-the-file-created-by-gpservice/m-p/1634543#M1421</link>
      <description>&lt;P&gt;I have a GpService that create a shape file.&lt;/P&gt;&lt;P&gt;In my code I am writing this file to&amp;nbsp;&lt;SPAN&gt;%scratchFolder%\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is created in this directory (as it should):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\disk1\arcgisserver\directories\arcgisjobs\agritest_gpserver\1234\scratch\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where the 1234 is the job number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can use the&amp;nbsp;%scratchFolder%\aaa.shp in my code after is it created (Describe or read it by cursor).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to use this file in the calling program so I return the&amp;nbsp;%scratchFolder%\aaa.shp as an output parameter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The path that I get is:&amp;nbsp;C:\Users\arcgis\AppData\Local\Temp\agritest_gpserver\1234\scratch\aaa.shp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where arcgis is the owner of the Enterprise and 1234 is the same job number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This dir exists on the server but it is empty. It looks like it created there temporary and was transferred to the jobs directory after the service ended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any way to get the job directory in the code of the gp service so I can return the correct directory?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 13:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/get-the-file-created-by-gpservice/m-p/1634543#M1421</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2025-07-21T13:54:00Z</dc:date>
    </item>
  </channel>
</rss>

