<?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: Delete a single file from multiple files in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/delete-a-single-file-from-multiple-files/m-p/459620#M504</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;The key argument of the command&amp;nbsp;DeleteContext is expecting the context key name of what you want to delete,&lt;BR /&gt;providing "File" will result with all files being deleted, you can use index=0 argument as well to delete only the first file for example,&lt;BR /&gt;but to achieve what you want to do this command won't be enough.&lt;BR /&gt;What I find as the best solution so far is to simply reset the File context key only with the files you wish to maintain, overwriting those you don't want;&lt;BR /&gt;You'll need to run the "Set" command, with a key argument of "File", for its value argument you will need to use the Filters &amp;amp; Transformers;&lt;BR /&gt;1. Get = File&lt;BR /&gt;2. Filter =&amp;nbsp;File.Extension "Equals" csv&lt;BR /&gt;&lt;BR /&gt;This way the File context key will be recreated, only with csv files,&lt;BR /&gt;thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 19:01:09 GMT</pubDate>
    <dc:creator>gfilippov</dc:creator>
    <dc:date>2022-01-19T19:01:09Z</dc:date>
    <item>
      <title>Delete a single file from multiple files</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/delete-a-single-file-from-multiple-files/m-p/457225#M490</link>
      <description>&lt;P&gt;I have created a sub-playbook(which is running in a loop for multiple inputs) generating multiple files json's and csv's. I want to delete json's only and keep csv's for a single run and at the end of loop, I want only csv's.&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;&lt;P&gt;I have tried delete context and in "Key" field I am passing entry ID of the file but I am getting error i.e&amp;nbsp; &lt;STRONG&gt;ID is restricted for Incident&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and you are not invited. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have the administrator level access.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 13:39:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/delete-a-single-file-from-multiple-files/m-p/457225#M490</guid>
      <dc:creator>anmolk171</dc:creator>
      <dc:date>2022-01-06T13:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a single file from multiple files</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/delete-a-single-file-from-multiple-files/m-p/459620#M504</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;The key argument of the command&amp;nbsp;DeleteContext is expecting the context key name of what you want to delete,&lt;BR /&gt;providing "File" will result with all files being deleted, you can use index=0 argument as well to delete only the first file for example,&lt;BR /&gt;but to achieve what you want to do this command won't be enough.&lt;BR /&gt;What I find as the best solution so far is to simply reset the File context key only with the files you wish to maintain, overwriting those you don't want;&lt;BR /&gt;You'll need to run the "Set" command, with a key argument of "File", for its value argument you will need to use the Filters &amp;amp; Transformers;&lt;BR /&gt;1. Get = File&lt;BR /&gt;2. Filter =&amp;nbsp;File.Extension "Equals" csv&lt;BR /&gt;&lt;BR /&gt;This way the File context key will be recreated, only with csv files,&lt;BR /&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 19:01:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/delete-a-single-file-from-multiple-files/m-p/459620#M504</guid>
      <dc:creator>gfilippov</dc:creator>
      <dc:date>2022-01-19T19:01:09Z</dc:date>
    </item>
  </channel>
</rss>

