フォルダ内に存在するファイルパスの一覧を取得したい
フォルダ内に存在するファイルパスを取得したい時にどうすればいいでしょうか?For Eachアクティビティや代入アクティビティを駆使して取得することが可能です。
今回はプロジェクトフォルダ内に「Data\都道府県別」というディレクトリが存在するとします。この中にある都道府県名のついたExcelをそれぞれ以下のように出力するにはどうすればいいでしょうか?
![](https://aftp.tokyo/wp-content/uploads/2021/05/2021-05-16-10_28_45-ActiproWindowChromeShadow-1024x314.jpg)
UiPath ワークフローの概要
![](https://aftp.tokyo/wp-content/uploads/2021/05/2021-05-16-1034.jpg)
各代入アクティビティの詳細
Dir = ("フォルダのパス")
FilePathArr = System.IO.Directory.GetFiles(Dir)
UiPathのワークフローの解説
フォルダのことを別名「ディレクトリ」と呼びます。ここでは変数「Dir(ディレクトリ)」をフォルダパスとして設定することで、次の文字列型配列の変数「FilePathArr」ではフォルダ内のパスをすべて取得するSystem.IO.Directory.GetFilesを使用しています。こうすることで、FilePathArrに各パスが取得されます。
ここで注意しておきたいのがFilePathArryの変数の型です。普通のString型ではなく、配列型のString[]になっていることに注意してください。配列型にすることでひとつの変数の中に複数の文字列を代入することができます。
最後に
最後に、For EachでFilePathArrの中をループ処理させることでFilePathをすべて出力することができました。このようにしてUiPathではフォルダパスのファイルの一覧を取得することができます。
是非、活用してみてください。
32件のフィードバック
best online pharmacies in mexico: mexican pharmacy online – buying prescription drugs in mexico online
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
Very fantastic information can be found on blog..
mexican drugstore online: online mexican pharmacy – purple pharmacy mexico price list
п»їlegitimate online pharmacies india: top online pharmacy india – indianpharmacy com
canadian family pharmacy: legal to buy prescription drugs from canada – legal canadian pharmacy online
canadian pharmacy 1 internet online drugstore: canada pharmacy reviews – ed drugs online from canada
canadian 24 hour pharmacy: www canadianonlinepharmacy – canadian pharmacy online ship to usa
purple pharmacy mexico price list: mexican online pharmacies prescription drugs – best online pharmacies in mexico
pharmacies in mexico that ship to usa: mexican pharmaceuticals online – buying from online mexican pharmacy
canadian pharmacy online: canadian pharmacies online – the canadian drugstore
mexican pharmacy: medicine in mexico pharmacies – buying from online mexican pharmacy
canadapharmacyonline com: canadian pharmacy online – canadian drugstore online
canadapharmacyonline: canadian discount pharmacy – canadian pharmacy world
trusted canadian pharmacy: my canadian pharmacy review – canadian pharmacy online ship to usa
reputable indian pharmacies: top 10 online pharmacy in india – world pharmacy india
https://amoxildelivery.pro/# amoxicillin azithromycin
http://paxloviddelivery.pro/# paxlovid cost without insurance
cost of clomid without dr prescription [url=https://clomiddelivery.pro/#]how to buy cheap clomid price[/url] can i get cheap clomid pills
https://paxloviddelivery.pro/# paxlovid pharmacy
http://clomiddelivery.pro/# can i order generic clomid
where to buy generic clomid without prescription [url=https://clomiddelivery.pro/#]can i order generic clomid tablets[/url] how can i get cheap clomid without insurance
http://paxloviddelivery.pro/# paxlovid for sale
https://clomiddelivery.pro/# can you get clomid tablets
http://amoxildelivery.pro/# amoxicillin 500mg buy online canada
purchase doxycycline [url=https://doxycyclinedelivery.pro/#]doxycycline online usa[/url] doxycycline 400 mg
https://ciprodelivery.pro/# cipro ciprofloxacin
https://ciprodelivery.pro/# buy ciprofloxacin over the counter
price for amoxicillin 875 mg [url=https://amoxildelivery.pro/#]can i buy amoxicillin over the counter[/url] ampicillin amoxicillin
https://clomiddelivery.pro/# clomid without a prescription
http://paxloviddelivery.pro/# paxlovid india
paxlovid cost without insurance [url=http://paxloviddelivery.pro/#]paxlovid cost without insurance[/url] paxlovid cost without insurance
http://ciprodelivery.pro/# buy cipro online canada
https://amoxildelivery.pro/# amoxicillin 500mg over the counter
cipro [url=http://ciprodelivery.pro/#]cipro for sale[/url] buy generic ciprofloxacin
https://ciprodelivery.pro/# cipro for sale
https://clomiddelivery.pro/# buying clomid tablets
cost cheap clomid without insurance [url=http://clomiddelivery.pro/#]can i get generic clomid pills[/url] buy generic clomid pill
http://clomiddelivery.pro/# where can i buy clomid pills