「ファイルの名前を変更する」ではファイルの名前を変更する他、置換、文字の追加、拡張子の変更などを行うことができます。
ファイルの名前を変更する
![PowerAutomateDesktop ファイルの名前を変更する1](https://sunagitsune.com/wp-content/uploads/2022/05/b1483ad70f4e012f3564c295fbaa7659.png)
ファイルの名前を変更するは、アクションペインのファイルから追加できます。
![PowerAutomateDesktop ファイルの名前を変更する2](https://sunagitsune.com/wp-content/uploads/2022/05/901840710cea064089b8061b2a75dcc7.png)
追加するとダイアログが表示されます。
名前を変更するファイル
![PowerAutomateDesktop ファイルの名前を変更する3](https://sunagitsune.com/wp-content/uploads/2022/05/2da6fb001b5b8033815864185b312a0f.png)
対象となるファイルのパスを指定します。ファイルの選択アイコンから直接ファイルを指定すると、
![PowerAutomateDesktop ファイルの名前を変更する4](https://sunagitsune.com/wp-content/uploads/2022/05/82437f182cf7110deb188292d12d5fdf.png)
自動的にファイルのパスが記入されて便利です。ファイルの名前などは{x}から一部変数に置き換えることも可能です。
![PowerAutomateDesktop ファイルの名前を変更する5](https://sunagitsune.com/wp-content/uploads/2022/05/ee902a5eb3921c00563ec6fa3ed215fa.png)
フォルダーの選択アイコンからは対象ファイルのあるフォルダを指定できます。
![PowerAutomateDesktop ファイルの名前を変更する6](https://sunagitsune.com/wp-content/uploads/2022/05/43d24bd231d7535a80fea68e728a6ead.png)
新しいフォルダを作成することも可能です。
ファイル名が欠けたままだとエラーになるので、直接記入や変数でこの後ろにファイル名を付ける必要があります。
ファイル名が欠けたままだとエラーになるので、直接記入や変数でこの後ろにファイル名を付ける必要があります。
名前の変更の方法
![PowerAutomateDesktop ファイルの名前を変更する7](https://sunagitsune.com/wp-content/uploads/2022/05/d8913a319f169717c7b8d78f89f213e9.png)
新しい名前を設定する、テキストを追加する、テキストを削除する、テキストを置換する、拡張子を変更する、日時を追加する、連番にするから選択できます。
ちょっと物量が多いので、新しい名前を設定する以外は後日追記します。
ちょっと物量が多いので、新しい名前を設定する以外は後日追記します。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」でテキストを追加する方法
「ファイルの名前を変更する」でテキストを追加するを選択した場合の使い方です。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」でテキストを削除する方法
「ファイルの名前を変更する」でテキストを削除するを選択した場合の使い方です。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」でテキストを置換する方法
「ファイルの名前を変更する」でテキストを置換するを選択した場合の使い方です。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」で拡張子だけを変更する方法
「ファイルの名前を変更する」で拡張子を変更するを選択した場合の使い方です。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」で日時を追加する方法
「ファイルの名前を変更する」で日時を追加するを選択した場合の使い方です。
![](https://sunagitsune.com/wp-content/uploads/2022/05/binders-gb6a985b3e_1280-160x90.jpg)
Power Automate Desktop:「ファイルの名前を変更する」で複数ファイルに連番をふる方法
「ファイルの名前を変更する」で連番にするを選択した場合の使い方です。
新しい名前を設定する
![PowerAutomateDesktop ファイルの名前を変更する8](https://sunagitsune.com/wp-content/uploads/2022/05/0c77e96d3e24b05d7ce63cfb35ea0b51.png)
ファイルに付けたい名前を指定します。
![PowerAutomateDesktop ファイルの名前を変更する9](https://sunagitsune.com/wp-content/uploads/2022/05/93b59bd48c2f7654cccb391ec185caa4.png)
実行すると、指定したファイルの名前が変更されます。
拡張子を保持する
![PowerAutomateDesktop ファイルの名前を変更する10](https://sunagitsune.com/wp-content/uploads/2022/05/3577d0f9a23da5d9d8c368483fec2f8c.png)
変更方法が新しい名前を設定するの時に表示されます。名前の変更を拡張子も含めて行うことができます。
![PowerAutomateDesktop ファイルの名前を変更する11](https://sunagitsune.com/wp-content/uploads/2022/05/53ef673feab6bdf76ee688d07fd835b9.png)
実行結果です。
ファイルが存在する場合
![PowerAutomateDesktop ファイルの名前を変更する12](https://sunagitsune.com/wp-content/uploads/2022/05/8bd3b428db931490dea227f63795b9ee.png)
変更後に同じ名前のファイルが既に存在する場合、変更を取り消すか、上書きするかを選択できます。
生成された変数
![PowerAutomateDesktop ファイルの名前を変更する13](https://sunagitsune.com/wp-content/uploads/2022/05/871e406e91b16de973c4594f1e9fa359.png)
変数名をクリックして変更可能、{x}から他の変数に値(変更後の名前)を上書き可能です。
![PowerAutomateDesktop ファイルの名前を変更する14](https://sunagitsune.com/wp-content/uploads/2022/05/d8ed15c55b4f4c4fd162c1a7494f5d46.png)
スイッチをオフにすると、変素が生成されなくなります。
エラー発生時
![PowerAutomateDesktop ファイルの名前を変更する15](https://sunagitsune.com/wp-content/uploads/2022/05/87f4d870cb0ce4c564c41df15956d087.png)
左下のエラー発生時からエラー時の処理を指定できます。
![PowerAutomateDesktop ファイルの名前を変更する16](https://sunagitsune.com/wp-content/uploads/2022/05/81e93a7ba89d95186ebbb27424b551bd.png)
詳細ではディレクトリが見つからない、ファイルが見つからない、ファイル名を変更できない場合の対処を個別に指定できます。
![](https://sunagitsune.com/wp-content/uploads/2021/11/machine-learning-g0b59793cc_1280-160x90.png)
Microsoft Power Automate Desktop(PAD)アクション、使い方一覧
Power Automate Desktopの使い方を機能・分類別に参照できるまとめです。
コメント