.folder()

Method that returns the folder location from the file. This method uses the function folder() for returning the folder.

Note: The path is always returned with forward slashes as directory separators.

The method .folder() is located in the file file.jsxinc.

Usage

var myfile = new File("C:/myfile.txt");
var folder = myfile.folder();

Parameters

This method has no parameters.

Return values

Value Meaning
folder The folder of the file (as a string), such as C:/.