Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


JS Extract pages with a forward slash '/' in the file naming??

Advocate ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

Natively in Acrobat Pro DC on Mac OSX you can extract pages with a forward slash '/' in the file naming,  when I try via java script I get the below error message. I've tried creating a folder level script with a trusted function with the same result. my question is it possible to extract pages is with a forward slash '/' in the file naming with a script rather than replacing the forward slash '/' with some other character?

The script works fine when I replace the forward slash '/'.

 

Screen Shot 2021-06-02 at 9.36.08 AM.png

Regards,

Mike

TOPICS
JavaScript

Views

246

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

I don't believe that's possible, since the file name has to be universal and in Windows you can't include a forward-slash in a file's name, at all.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

A slash is absolutely impossible and Forbidden in Mac file names. It is a directory separator and nothing else. Finder might do some weird trick, but the real file name won't have a slash. JavaScript does not use Finder.  Just avoid slashes, you will be happier. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

LATEST

I can't find any Apple documentation to this effect, but I think that Finder swaps ":" with "/". So a file you see in Finder called A/B is actually called A:B. Meanwhile, a file called Re:Animator in the Mac shows up in Finder as Re/Animator. Apparently, AppleScript may interpret them either way.

 

So to me the take home message is: forbid both : and / in your filenames if you want to keep your hair!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines