Hi Jang,
This from Chapter 3 of the JavaScript Tools Guide:
There are several ways to distinguish between a File and a Folder object. For example:
if (f instanceof File) ...
if (typeof f.open == "undefined") ...// Folders do not open
File and Folder objects can be used anywhere that a path name is required, such as in properties and arguments for files and folders.
Rick