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

Is there way to detect if user selects files from anywhere other than local computer?

Explorer ,
Jun 07, 2017 Jun 07, 2017

Hi,

Is there a way to detect if the user selects pdf's for an action wizard from anywhere other than their c:// drive?  I noticed that when they select pdf's from anywhere other than c:// and run the action wizard and then go back to selecting other files from the c://, it just does not execute but on 1st file.  I read this has something to do with a bug where Adobe thinks the other files are open when they are not.   Anyway, my thought on this is to generate an app.alert when the user selects pdf's from anywhere other than c:// to prevent this from happening in the first place. 

Any help would be greatly appreciated.

S

TOPICS
Acrobat SDK and JavaScript , Windows
444
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

correct answers 1 Correct answer

Community Expert , Jun 07, 2017 Jun 07, 2017

I haven't heard about this problem, but yes, it's possible.

You can look at the path property of the file and see where it is saved, like this:

if (this.path.indexOf("/C/")!=0) {

    app.alert("You should only process files from the C drive.");

    event.rc = false; // this line stops the Action from processing more files
} else {
// put the rest of your code here
}

Translate
Community Expert ,
Jun 07, 2017 Jun 07, 2017

I haven't heard about this problem, but yes, it's possible.

You can look at the path property of the file and see where it is saved, like this:

if (this.path.indexOf("/C/")!=0) {

    app.alert("You should only process files from the C drive.");

    event.rc = false; // this line stops the Action from processing more files
} else {
// put the rest of your code here
}

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
Explorer ,
Jun 07, 2017 Jun 07, 2017
LATEST

This is exactly what I needed!  Thanks again.

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