UiPath フォルダ内のファイルパス一覧を取得

フォルダ内に存在するファイルパスの一覧を取得したい

フォルダ内に存在するファイルパスを取得したい時にどうすればいいでしょうか?For Eachアクティビティや代入アクティビティを駆使して取得することが可能です。

今回はプロジェクトフォルダ内に「Data\都道府県別」というディレクトリが存在するとします。この中にある都道府県名のついたExcelをそれぞれ以下のように出力するにはどうすればいいでしょうか?

UiPath ワークフローの概要

各代入アクティビティの詳細

Dir = ("フォルダのパス")
FilePathArr = System.IO.Directory.GetFiles(Dir)

UiPathのワークフローの解説

フォルダのことを別名「ディレクトリ」と呼びます。ここでは変数「Dir(ディレクトリ)」をフォルダパスとして設定することで、次の文字列型配列の変数「FilePathArr」ではフォルダ内のパスをすべて取得するSystem.IO.Directory.GetFilesを使用しています。こうすることで、FilePathArrに各パスが取得されます。

ここで注意しておきたいのがFilePathArryの変数の型です。普通のString型ではなく、配列型のString[]になっていることに注意してください。配列型にすることでひとつの変数の中に複数の文字列を代入することができます。

最後に

最後に、For EachでFilePathArrの中をループ処理させることでFilePathをすべて出力することができました。このようにしてUiPathではフォルダパスのファイルの一覧を取得することができます。

是非、活用してみてください。

173件のフィードバック

  1. hey there and thank you for your information – I have certainly picked up anything new from right here.
    I did however expertise several technical points using this site, since I experienced to
    reload the site a lot of times previous to I could get it to load correctly.

    I had been wondering if your web hosting is OK? Not that I am complaining, but
    slow loading instances times will very frequently affect your placement in google
    and can damage your quality score if advertising and marketing with Adwords.
    Anyway I’m adding this RSS to my email and can look out for a lot more of
    your respective intriguing content. Make sure you update this again very soon..

    Escape room

  2. That is the fitting blog for anyone who needs to search out out about this topic. You notice so much its virtually hard to argue with you (not that I truly would need…HaHa). You undoubtedly put a brand new spin on a topic thats been written about for years. Nice stuff, simply great!

  3. Hey there! This is my 1st comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading through your articles. Can you recommend any other blogs/websites/forums that cover the same subjects? Thank you so much!

  4. I simply had to thank you very much all over again. I’m not certain the things that I would have worked on in the absence of those smart ideas contributed by you directly on that area. It seemed to be a real hard dilemma in my view, nevertheless viewing a well-written tactic you solved the issue took me to jump for happiness. I’m happier for this information and wish you really know what a great job that you’re carrying out educating the mediocre ones all through your website. Probably you’ve never got to know all of us.

  5. indian pharmacy [url=http://indianpharm24.pro/#]India pharmacy delivery[/url] mail order pharmacy india

  6. best online pharmacy india [url=https://indianpharm24.pro/#]Indian pharmacy international shipping[/url] best online pharmacy india

  7. buying prescription drugs in mexico online [url=http://mexicanpharm24.cheap/#]mexican pharm 24[/url] mexico pharmacies prescription drugs

  8. erection pills viagra online [url=http://pharm24.pro/#]cheaper medications[/url] erectile dysfunction drug

  9. buy medicines online in india [url=http://indianpharm24.pro/#]India pharmacy delivery[/url] online pharmacy india

  10. Online medicine order [url=https://indianpharm24.pro/#]Pharmacies in India that ship to USA[/url] india online pharmacy

  11. purple pharmacy mexico price list [url=http://mexicanpharm24.cheap/#]mexico pharmacy[/url] pharmacies in mexico that ship to usa

  12. top 10 pharmacies in india [url=https://indianpharm24.pro/#]India pharmacy international[/url] п»їlegitimate online pharmacies india

  13. п»їlegitimate online pharmacies india [url=https://indianpharm24.pro/#]indian pharm 24[/url] top 10 online pharmacy in india

  14. Hey! Do you know if they make any plugins to assist with Search Engine Optimization? I’m
    trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.

    If you know of any please share. Appreciate it!
    I saw similar blog here: Eco product

  15. Thank you, I have recently been searching for info about this topic for a while and yours is the best I’ve came upon so far. But, what in regards to the conclusion? Are you positive about the source?

  16. Hello! I’ve been reading your site for a long time now and finally got the courage to go ahead and give you a shout out from Austin Texas! Just wanted to mention keep up the good job!

  17. Oh my goodness! Awesome article dude! Many thanks, However I am having troubles with your RSS. I don’t understand why I can’t subscribe to it. Is there anyone else getting identical RSS problems? Anyone that knows the solution can you kindly respond? Thanx!

  18. Hi there! I could have sworn I’ve been to this site before but after going through some of the posts I realized it’s new to me. Nonetheless, I’m definitely pleased I found it and I’ll be book-marking it and checking back regularly.

  19. Nice post. I learn something totally new and challenging on websites I stumbleupon everyday. It’s always interesting to read articles from other writers and use a little something from their web sites.

  20. Oh my goodness! Incredible article dude! Thanks, However I am experiencing difficulties with your RSS. I don’t know the reason why I can’t subscribe to it. Is there anybody else having identical RSS issues? Anyone who knows the answer can you kindly respond? Thanks!

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

目次