Automated basic text file operations.(Power Automate Desktop)
This section shows how to read from and write to basic text files.
Steps
Read data from a text file.
Load all in one batch.
Load the following text as a sample.
Set up a Read text from file Action in File on the workspace.
Set parameters.
Parameter | Value |
---|---|
File path | Specify the file to be read. Clicking the file icon on the right The file selection dialog will open. You may specify the file path with a file type variable or a text type variable. |
Store content as | Single text value |
Encoding | The character encoding of the text file. |
After saving this action and executing the flow, the The contents of the file will be set in the produced variable FileContents.
Read one line at a time.
If you change the Store content as to List(each is as list item) The contents will be read in a List format, divided by line.
Set up a For each in the Loops.
Repeat the action in For each for each line of content in the loaded text file.
The content of one line is set to CurrentItem.
Specify %FileContents% as the value to be iterate.
Write data to a text file.
Set up a Write text to file Action in File on the Workspace.
Set parameters.
Parameter | Value |
---|---|
File path | Specify the file to be written. Clicking the file icon on the right A file selection dialog will open. You may specify the file path with a file type variable or a text type variable. |
Text to write | Specifies the text to be written to the file. |
Append new line | Turn ON to insert a line break at the end of the text. |
If file exists | Specify the action to be taken when a file already exists in the file path. Overwrites existing content…Discards the contents of the existing file and writes it. Append content…Append to the end of the content of an existing file. |
Encoding | Character code of the text file. |
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.
Links
Introduction.
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.
Discussion
New Comments
No comments yet. Be the first one!