Returns the path to special folders (subdirectories).
TrFile_FindFolder ( folderSwitch )
|folderSwitch||specifies the name of the wanted special folder.|
Data type returned
FileSpec The path to the folder.
If a special folder is not available for that platform $$-1 is returned.
Troi File Plug-in 1.1
FileMaker Pro 16 to 19
Not every special folder is available for each platform.
Note that there is a trash folder for every volume. Currently this function returns the trash folder on the startup disk.
Some folders are no longer available on macOS, and will return $$-43 (file not found).
Set Field [ result ; TrFile_FindFolder ( "-Trash" ) ]
This will return the full path of the Trash folder.
TIP: With this folder and the MoveFile function you can move items into the Trash. Be aware that each disk has its own trash, so there may be more than one trash. FindFolder returns the trash of the startup disk.
Set Field [ gStartupDiskFolder ; TrFile_FindFolder ( "-Root" ) ]
This will return the top folder on the startup disk, for example “C:”.
Used in example file