These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

List of files in a directory.

serge
Registered: May 26 2008
Posts: 2

How can we list the files of a particular directory in Javascript.

(such as : var dirList = dir.getFiles("*.pdf");
)

Is that possible ?
I don't find any of this in the reference guides.

Serge

My Product Information:
Acrobat Pro 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can't. Acrobat is supposed to be sandboxed so that code in an arbitrary PDF can't damage the users system. As such, general file system access is not allowed.

All general file system access has to be through the user.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

saraveenan
Registered: Oct 21 2007
Posts: 38
hi,

You cant get the list like that. But you can input the filenames as text file and can be accessed by javascript.

Saravana

Saravanan Murugesan