Fandom

Livecode Wiki

DefaultFolder

2,161pages on
this wiki
Add New Page
Comments0 Share

Specifies the folder that is used by the files and folders functions and by commands that manipulate files.Syntax:

set the defaultFolder to <folderPath>

Examples:

set the defaultFolder to "/Applications/GetIt" --MacOS, Linux-style file path
set the defaultFolder to "C:/Program Files/GetIt" -- Windows-style file path
# set the defaultFolder to the folder containing the stackfile
set the itemDelimiter to slash
get the effective filename of this stack
set the defaultFolder to item 1 to -2 of it

Use the defaultFolder to perform file manipulations on files in the same folder without having to include the full path.

The defaultFolder property specifies the folder LiveCode uses as the current directory when resolving [[relative file path|relative paths]] (except for relative paths specified in the stackFiles property).

If you specify a file without giving its full path, LiveCode looks for the file in the defaultFolder. If you specify a [[relative file path|relative path]], the defaultFolder is prepended to it to create the full path.

You cannot delete the current defaultFolder.

The folderPath is specified using Unix conventions,

even on Mac OS and Windows systems. The names of folders are separated with a "/" character, and absolute paths (starting with a disk or partition name) must begin with a "/" character.

See also: create alias (command),files (function),folders (function),itemDelimiter (property),result (function),revSetDatabaseDriverPath (command),slash (constant),stackFiles (property),

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.