# GetFolderPath - スクリプト関数

GetFolderPath 関数は、Microsoft Windows SHGetFolderPath 関数の値を返します。この関数は、Microsoft Windows フォルダの名前を入力として返し、フォルダのフルパスを返します。

情報メモこの関数は標準モードに対応していません。「[ファイル システム アクセス制御](https://help.qlik.com/ja-JP/sense/November2024/Subsystems/Hub/Content/Sense_Hub/LoadData/file-system-access-restriction.htm)」を参照してください。

構文:

GetFolderPath(foldername)

引数：

引数

| 引数 | 説明 |
| --- | --- |
| foldername | Microsoft Windows フォルダの名前。<br><br>フォルダ名には、空白を含めないでください。Windows Explorer でのフォルダ名の空白は、フォルダ名から削除する必要があります。<br><br>例:<br><br>MyMusic<br><br>MyDocuments |

例と結果:

この例では、次の Microsoft Windows フォルダのパスを取得することが目標です。MyMusic および MyPictures 、Windows。例のスクリプトをアプリに追加し、リロードします。

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

アプリをリロードすると、項目 MyMusic および MyPictures 、Windows がデータ モデルに追加されます。各項目には、入力で定義されたフォルダへのパスが含まれます。例:

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