Skip to main content

GetFolderPath - script function

The GetFolderPath function returns the value of the Microsoft Windows SHGetFolderPath function. This function takes as input the name of a Microsoft Windows folder and returns the full path of the folder.

Information noteThis function is not supported in standard mode. See File system access restriction

Syntax:  

GetFolderPath(foldername)

Arguments:  

Argument Description
foldername

Name of the Microsoft Windows folder.

The folder name should not contain any space. Any space in the folder name seen in Windows Explorer should be removed from the folder name.

Examples:

MyMusic

MyDocuments

Examples and results:  

The goal of this example is to get the paths of the following Microsoft Windows folders: MyMusic, MyPictures and Windows. Add the example script to your app and reload it.

LOAD GetFolderPath('MyMusic') as MyMusic, GetFolderPath('MyPictures') as MyPictures, GetFolderPath('Windows') as Windows AutoGenerate 1;

 

Once the app is reloaded, the fields MyMusic, MyPictures and Windows are added to the data model. Each field contains the path to the folder defined in input. For example:

  • C:\Users\smu\Music for the folder MyMusic
  • C:\Users\smu\Pictures for the folder MyPictures
  • C:\Windows for the folder Windows

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!