「フォルダーを選択」アクティビティを使って処理するファイルが保存されているフォルダーをユーザーに選択してもらうのですが、
デフォルトの変更はできるのでしょうか。
よろしくお願い致します。
「フォルダーを選択」アクティビティを使って処理するファイルが保存されているフォルダーをユーザーに選択してもらうのですが、
デフォルトの変更はできるのでしょうか。
よろしくお願い致します。
こんにちは
フォルダー選択アクティビティは初期選択パスを設定できませんので
かわりにFolderBrowserDialogクラスを使うと良いと思います。

詳しい使い方は以下参照ください。
Sorry to bother you out of the blue. Is it possible to open this dialog box in the foreground?
Is this the FolderBrowserDialog?
A few approaches come to mind.
Call the following code using InvokeCode (C#) (outFolderName is an argument):
var f = new System.Windows.Forms.FolderBrowserDialog();
f.ShowDialog(new System.Windows.Forms.Form() { TopMost = true});
outFolderName=f.SelectedPath;
Activate it using UiAutomation. Use parallel activities to call that part in advance in a separate process.
By the way, I’m developing with StudioX. I’m worried about what I can accomplish.
Thu, May 15, 2025, 14:26 Yoichi via UiPath Community Forum <notifications@uipath.discoursemail.com>:
Thank you. I got it working this way.
>Call the following code using InvokeCode (C#) (outFolderName is an argument)
I wanted to set the default folder, so I added selectedPath (set the path in MyPath via an argument)!
var ofd = new System.Windows.Forms.FolderBrowserDialog();
ofd.SelectedPath = MyPath;
ofd.ShowDialog(new System.Windows.Forms.Form() { TopMost = true});
outFolderName=ofd.SelectedPath;