Know I want to import a set of files located in the same folder, the path of this folder is known and always the same. Only the quantity of files varies, and their names.
This script will run from an Action in Acrobat Pro DC for Windows.
To protect the users from having a script being able to access all the files on their computer...
Actually, you could do this with a batch process. The script would need a way to identify the target file. A global is good for this. Then the script imports each file in the batch to the target. I don't see any problems with this technique.
try67: This script will run from an Action in Acrobat Pro, so I didn't see any security issues. If needed the user can confirm the folder's path.
Thom : my idea was a loop inside the target folder to catch all files, would it be possible?
Hi JR, Unfortunatley there is no general file system access from the Acrobat scripting model. So the only way to process an arbitrary set of files is through a batch process.
Another solution that I have used frequently is to create a VB application that uses the IAC to preform a kind of psuedo-batch operation. But this is a Windows only solution, and the batch script is much easier to implement.
I'm not sure to undestand, what do you mean by "batch process"?
Isn't an Action a batch process?
The use of VB is excluded, I will not learn a new foreign language just for that 😉
But for my technique that uses an external VB program, I'm talking about batch processing in the generic sense, not an Action, but rather the process of iterating over a group of files, as implemented through the VB program.