<?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: Running all macros in a folder in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7480153#M25065</link>
    <description>&lt;PRE&gt;STRING $dir = "C:\dcam\config\macros"
STRING LIST $files = sort(list_files("files",$dir,".mac"))

FOREACH mac IN files {
	MACRO $mac
}&lt;/PRE&gt;</description>
    <pubDate>Sat, 21 Oct 2017 09:20:31 GMT</pubDate>
    <dc:creator>rafael.sansao</dc:creator>
    <dc:date>2017-10-21T09:20:31Z</dc:date>
    <item>
      <title>Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7479721#M25064</link>
      <description>&lt;P&gt;In an effort to clean up some of my macro paths/etc I would like to incorporate a "run all in folder" sort of command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no idea how to practically impliment this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The macros in question are labeled by number eg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1-Run this&lt;/P&gt;&lt;P&gt;2-Run that&amp;nbsp;&lt;/P&gt;&lt;P&gt;3-Run this too&lt;/P&gt;&lt;P&gt;77-This as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I have a file named "1000-Run all" that I tend to incorporate and manually assign file locations to it within the macro file but this is INCREDIBLY tedious and inflexible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end goal is basically;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-List all the files in this directory in alphabetical order&lt;/P&gt;&lt;P&gt;-For each $file ; macro $file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im wording this really poorly but help is appreciated. I am getting REALLY tired of updating a bunch of directories by hand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 22:44:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7479721#M25064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-20T22:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7480153#M25065</link>
      <description>&lt;PRE&gt;STRING $dir = "C:\dcam\config\macros"
STRING LIST $files = sort(list_files("files",$dir,".mac"))

FOREACH mac IN files {
	MACRO $mac
}&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Oct 2017 09:20:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7480153#M25065</guid>
      <dc:creator>rafael.sansao</dc:creator>
      <dc:date>2017-10-21T09:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584394#M25066</link>
      <description>&lt;P&gt;I've encountered a very similar problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I able to open powermill projects this way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;STRING $dir = THEDIRECTORY\"
STRING LIST $files = sort(list_files("files",$dir,".pmlprj"))

FOREACH pmlprj IN files {
	FORM RIBBON BACKSTAGE CLOSE PROJECT RECOVERY OPEN PROJSELECTOR
	$pmlprj
}&lt;/PRE&gt;&lt;P&gt;I've been hacking away at it but frankly it's a bit above my head.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 02:51:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584394#M25066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T02:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584506#M25067</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;
&lt;PRE&gt;FOREACH pmlprj IN files { //FORM RIBBON BACKSTAGE CLOSE &lt;BR /&gt; PROJECT RECOVERY OPEN $pmlprj &lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 05:00:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584506#M25067</guid>
      <dc:creator>kukelyk</dc:creator>
      <dc:date>2017-11-30T05:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584525#M25068</link>
      <description>&lt;P&gt;That seems to do the trick though I may have tripped myself up with my own file structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case it is P:\Power Mill\Update\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are many sub-folders within this folder eg;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P:\Power Mill\Update\Plate1\Plate1set1\plate1set1.pmlprj&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I can set it to look through all the folders within that folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 05:25:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584525#M25068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T05:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584599#M25069</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;list list_files( string flags, string dirpath[, string filetype])&lt;BR /&gt;Returns a list of files in the dirpath that optionally matches the filetype. flags can be either "all" (return files and directories), "files" (return just files), or "dirs" (return just directories)&lt;FONT color="#FF0000"&gt;. If flags ends with "+" then files in subdirectories are also returned. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 30 Nov 2017 06:22:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584599#M25069</guid>
      <dc:creator>kukelyk</dc:creator>
      <dc:date>2017-11-30T06:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Running all macros in a folder</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584637#M25070</link>
      <description>&lt;P&gt;Outstanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if you are familiar with the existential dread associated with making a few minor tweaks on a thousand plates but you have saved me from it.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 06:51:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/running-all-macros-in-a-folder/m-p/7584637#M25070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T06:51:46Z</dc:date>
    </item>
  </channel>
</rss>

