Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

Folders.UserDownloads

Queries location of user's downloads folder.

Component Version macOS Windows Linux Server iOS SDK
Folders 6.2 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "Folders.UserDownloads" )

Parameters

none

Result

Returns path or error.

Description

Queries location of user's downloads folder.
This is a native path. You can use Path.NativePathToFileMakerPath if you need to use path in a script step.
e.g. C:\Users\test\Downloads on Windows or /Users/test/Downloads on Mac.

Examples

Query download folder path:

MBS( "Folders.UserDownloads" )

Create folder in downloads:

Set Variable [$folder; Value:MBS( "Folders.UserDownloads" )]
If [IsEmpty(Container Export::Name)]
    Set Field [Container Export::Name; "Record " & Get(RecordID)]
End If
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; $folder; Container Export::Name )]
Set Variable [$r; Value:MBS("Files.CreateDirectory"; $path)]

Get file in download folder:

Set Variable [$folder; Value:MBS( "Folders.UserDownloads" )]
Set Variable [$path; Value:MBS( "Path.AddPathComponent"; $folder; "test.txt" )]

See also

Blog Entries

This function is free to use.

Created 22nd March 2016, last changed 10th August 2022


Folders.UserDocuments - Folders.UserFonts

💬 Ask a question or report a problem