3 Replies Latest reply on Sep 23, 2013 12:55 AM by try67

    extract first page from specific location (single level)


      Hi all,


      A colleague and I have been working on a batch script for extraction of first page in Acrobat XI.


      So far, we have been able to make this work.  The only issue that we are having is that the process currently pulls all pdf files from all sub folders as well as the root.


      I need to be able to run the batch process only in the root folder, as I have a few different instances of this layout and it must be set out this way. 

      The sequence script so far is as follows:



      <?xml version="1.0" encoding="UTF-8"?>

      <Workflow xmlns="http://ns.adobe.com/acrobat/workflow/2012" title="Batch First Page Export to folder" description="" majorVersion="1" minorVersion="0">


                          <Folder path="/E/PES/2013/AMC/NCMCRS/"/>


                <Group label="Untitled">

                          <Command name="JavaScript" pauseBefore="false" promptUser="false">


                                              <Item name="ScriptCode" type="text" value="/* extract pages */&#xD;&#xA;var sourcefolder=(&apos;e/PES/2013/AMC/NCMCRS/*.pdf&apos;)&#xD;&#xA;var oNewDoc=this.extractPages(0)&#xD;&#xA;var oFlName=this.documentFileName.split(&quot;.&quot;).shift()+&quot;_PG1.pdf&quot;&#xD;&#xA; var oPath=&quot;/E/PES/2013/AMC/NCMCRS/Batch/&quot; +  oFlName&#xD;&#xA;oNewDoc.saveAs(oPath)&#xD;&#xA;oNewDoc.closeDoc(true)&#xD;&#xA;"/>

                                              <Item name="ScriptName" type="text" value=""/>







      What do I need to change in the sources string so that the process stops in the "NCMCRS" folder?