Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87055

Exact pages path using regular wild card expression

$
0
0

I have a script which will extract a pdf file to a predefined directory.

 

The file path includes a text field in the parameter VendorNo.

 

This is the actual windows directory path

H:\ Drawing Office\PDF\Scripting Form Fields\Mail Merge\002 - Centrifuge

 

The file path generated from the script  is

H:\ Drawing Office\PDF\Scripting Form Fields\Mail Merge\002

 

I need to include a wild card for the end part of the directory path for " - Centrifuge", as the end of the file path string may vary. 

 

I have tried a regular expression wild card for any number of characters in the script such as    /./

 

I have attempted this in the script as follows but it does not work.

 

/ Extract and save Form by calling folder level script
var g = this.getField("VendorNo");
var k = g.valueAsString;
var l = k.match(/./);

var j = this.numPages;

var myPath = "/h/Drawing Office/PDF/Scripting Form Fields/Mail Merge/" + l + "/" + "test.pdf";

        this.extractPages(0,j-1,myPath);

If anyone can please provide assistance with the regular expression, I would be most grateful.


Viewing all articles
Browse latest Browse all 87055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>