Skip to main content
Known Participant
June 7, 2017
Answered

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

  • June 7, 2017
  • 1 reply
  • 491 views

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

This topic has been closed for replies.
Correct answer try67

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
}

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 7, 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
}

suemo22Author
Known Participant
June 8, 2017

This is exactly what I needed!  Thanks again.