What to do if the specified file does not exist.(Power Automate Desktop)


Japanese version.

When using the Load File action, the

If the target file does not exist, an error may occur and must be dealt with.

How to deal with it

existence check

The existence of the file is checked in advance with the If file exists Action.

If you want to notify users, select Doesn't exist for If file exists and specify the file path to be checked. The user notification action will be placed below it.

And additionally, select Exists for If file and place an action to use the file under it.

If the file does not exist, it is also useful to use Display select dile dialog Action and ask the user to specify a different file.

Wait until the file is created

Drag Wait for file Action to the workspace if files may be created at different times.

Then set Wait for file to be to Deleted.

This will put the file in a waiting state until it is created.

Use error (exception) handling

Error (exception) handling is also possible to some extent.

Drag On block error Action to the workspace and select Continue flow run and set Exception handling mode to Go to End of Block.

In the flow below, if the file does not exist, the processing in the block after Read from CSV file Action is not performed.

However, the part after 4, which is outside the block, will be performed.

For those who want to learn Power Automate Desktop effectively

The information on this site is now available in an easy-to-read e-book format.

Or Kindle Unlimited (unlimited reading).

You willl discover how to about basic operations.

By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.


Tips(Power Automate Desktop)