こんにちは。UiPath Studio EnterPrise版23.4.2ユーザの初心者です。
指定フォルダパスのファイル一覧をlist変数lis_Pathに取得する構文は
lis_Path=System.IO.Directory.GetFiles(指定フォルダパス).ToList
であることを知っておりますが、
指定フォルダパスの配下にサブフォルダがあり、その配下のファイル一覧をlist変数lis_Pathに取得する構文をご存じの方、ご教示ください。
こんにちは。UiPath Studio EnterPrise版23.4.2ユーザの初心者です。
指定フォルダパスのファイル一覧をlist変数lis_Pathに取得する構文は
lis_Path=System.IO.Directory.GetFiles(指定フォルダパス).ToList
であることを知っておりますが、
指定フォルダパスの配下にサブフォルダがあり、その配下のファイル一覧をlist変数lis_Pathに取得する構文をご存じの方、ご教示ください。
Hi @gorby
Use the below expression
Directory.GetFiles("your_folder_path", "*.*", SearchOption.AllDirectories).ToList()
System.IO
namespace that retrieves an array of file names in a specified directory that match a certain search pattern.Hope it helps!!
Hi @gorby
Try this:
Assign Activity:
Variable: lis_Path (List<String>)
Value: Directory.GetFiles("specified folder path", "*", SearchOption.AllDirectories).ToList
In this syntax:
"specified folder path"
with the actual path of the folder you want to search in."*"
is used as the search pattern, which means all files will be included. You can modify this pattern to filter files based on a specific file extension or name pattern.SearchOption.AllDirectories
ensures that files from all subdirectories are included.Hope it helps!!
Regards
サブフォルダーからファイルを取得するアクティビティごとに、内部のアクティビティごとに別の 1 つを使用します。
これは、メインフォルダー内に多数のサブフォルダーがある場合に便利です。
またはフォルダーアクティビティ内の各ファイルに使用します
フォルダーオプションでメインフォルダーのパスを直接渡します
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.