# GetFolderPath スクリプト関数

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

情報メモこの関数は標準モードに対応していません。「[ファイル システム アクセス制御](https://help.qlik.com/ja-JP/sense/May2026/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