Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Advisor ,
Jun 02, 2021 Jun 02, 2021

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.pngexpand image

Regards,

Mike

TOPICS
JavaScript
755
Translate
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
Community Expert ,
Jun 02, 2021 Jun 02, 2021

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.

Translate
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

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. 

Translate
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
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!

Translate
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