<?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 Determine file extension before running power shell script in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/determine-file-extension-before-running-power-shell-script/m-p/5627061#M9485</link>
    <description>&lt;P&gt;I have created a power shell script but I need to check the selected file extension and only allow it to run on IPT or IAM files.&amp;nbsp; How can I get the extension and exit the script if it is the wrong type?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
    <pubDate>Fri, 08 May 2015 16:24:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-08T16:24:11Z</dc:date>
    <item>
      <title>Determine file extension before running power shell script</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/determine-file-extension-before-running-power-shell-script/m-p/5627061#M9485</link>
      <description>&lt;P&gt;I have created a power shell script but I need to check the selected file extension and only allow it to run on IPT or IAM files.&amp;nbsp; How can I get the extension and exit the script if it is the wrong type?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 16:24:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/determine-file-extension-before-running-power-shell-script/m-p/5627061#M9485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-08T16:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Determine file extension before running power shell script</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/determine-file-extension-before-running-power-shell-script/m-p/5629203#M9486</link>
      <description>&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it DataStandard that you are asking about? If it is, then in the powershell you can use one of the system variables called &lt;STRONG&gt;_FileExt&lt;/STRONG&gt; in the $Prop[] array.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if ($Prop["_FileExt"].Value -eq "IAM" -or $Prop["_FileExt"].Value -eq "IPT" )
{
    #your code here
}
else
{
    #exit script or messagebox etc.
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 May 2015 06:56:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/determine-file-extension-before-running-power-shell-script/m-p/5629203#M9486</guid>
      <dc:creator>wangdu</dc:creator>
      <dc:date>2015-05-11T06:56:01Z</dc:date>
    </item>
  </channel>
</rss>

