File handling in Power Automate for desktop

Intro The local accountant, Hanne Hansen, needs help in sorting her files. What you will learn Primarily: Work with files Create a log Secondarily: For each loops Date and time Lists Client Name Accountant Hanne Hansen Process Name FileSorting Description The one-person company Accountant Hanne Hansen spends valuable time sorting its files day after day. […]

Intro

The local accountant, Hanne Hansen, needs help in sorting her files.

What you will learn

  • Primarily:
    • Work with files
    • Create a log
  • Secondarily:
    • For each loops
    • Date and time
    • Lists

Client Name

Accountant Hanne Hansen

Process Name

FileSorting

Description

The one-person company Accountant Hanne Hansen spends valuable time sorting its files day after day. You'll create an RPA process that solves this:
  • Download the example files here
  • Create an automation that sorts each file type (Notepad, Word, and Excel) into the right folder
    • Beware: There is a zip-file, which you need to extract initially
  • Create a log that includes:
    • Time-stamp
    • The number of sorted files
    • How many individual files got sorted (Notepad, Word, and Excel)
    • The full path of each file

Hints

  • Unzipping
    • Get files in folder
      • Collect the file names in a list
    • For each
      • Iterates the list
    • Unzip files
    • Delete file(s)
  • Sort files
    • Get files in folder
    • For each
    • If else
    • Move file(s)
  • Logging
    • Create three new lists (one for each file type)
    • In each branch in the If, add an Add item to list
    • Get current date and time
    • Convert datetime to text
    • Set variable (to be able to create a log in multiple lines)
    • Write text to file

Video Guide

https://youtu.be/igl93T9Jrmc

Write a comment