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.




Argument Description

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 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