# GetFolderPath - スクリプト関数

GetFolderPath 関数は、Microsoft Windows SHGetFolderPath 関数の値を返します。この関数は Microsoft Windows のフォルダー名が入力されると、フォルダーのフル パスを返します。

構文:

GetFolderPath(foldername)

引数：

GetFolderPath 引数

| 引数 | 説明 |
| --- | --- |
| 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 がデータ モデルに追加されます。各項目には入力で定義されたフォルダへのパスが含まれます。以下に例を挙げます。

* フォルダ MyMusic の場合は C:\Users\smu\Music
* フォルダ MyPictures の場合は C:\Users\smu\Pictures
* フォルダ Windows の場合は C:\Windows