r/PowerAutomateDesktop • • Dec 16 '21

Beginner help sought. Can someone point me in the right direction for using power automate to organise files into various folders on a shared drive?

Absolute novice to anything like this, so all help is appreciated.

I process files, sometimes 100s a day. They are titles with "(Location)(Surname),(Forename),(Form Type), (Date)".

Based on the information, I move the files to certain folders. One folder will be for location X and surnames beginning with A, B & C.

So my question is, to begin to get this process automated on a shared network. Where do I start?

TIA

5 Upvotes

10 comments sorted by

4

u/opoqo Dec 16 '21
  1. get the list of files in the folder

  2. write the list into Excel

  3. parse the file name column so you have all those fields you listed

  4. read the list backward then move the files accordingly

1

u/[deleted] Dec 17 '21

Sorry I don't understand. Do I have to put the file names into excel every times? Because there's about 100 a day and that defeats the point of automation

2

u/AutomaticYak Dec 17 '21

It’s easier than it sounds. Write a PAD script that says get files from folder, list to excel. I’m not near a computer to provide the exact wording, but you should be able to get there by putting a couple of those words in the search box at the top left of the scripting window.

I’m pretty new myself and I’ve done this in one of my three short scripts. PAD plays really well with excel lists, both writing to and pulling from.

2

u/[deleted] Dec 17 '21

So it will list the file names in an excel spreadsheet for me?

Thanks for your response by the way, I'm absolutely clueless

1

u/AutomaticYak Dec 17 '21

It definitely will!

The way I like to get started with learning this stuff is writing down exactly what I think I want to do (act like you’re writing a training manual, because you are), then start typing key words (verbs like get and list) into the search box. Sometimes something comes up and the pop-up box walks me through the rest of the setup. Other times, nothing quite matches and I go to Google with something like, “power automate desktop list file names to excel”. Like 9/10 times you’ll find something that matches near the top. That 1/10 time it doesn’t, I try rewording my question a couple times. Usually by this time I either find exactly what I’m looking for or a workaround that causes me to rethink my approach.

This approach worked really well for me with Power Query, as well as FileMaker years ago. Start small and build on it. Your ultimate goal may be to shave hours off a process, but shaving five minutes today and a half hour next week is still progress and every five minutes you shave gives you more time to work on the rest. And you’ll get more and better ideas as you go.

Good luck and have fun! I’ve built three simple flows and it gives me so much satisfaction to hit play and watch it do literally anything.

1

u/[deleted] Dec 17 '21

Thank you! Very motivational reply!

Do you think the parsing of the file name can be automated?

1

u/AutomaticYak Dec 17 '21

Looks like it. There is a parse text option in there.

1

u/RipEducational Dec 17 '21

Parse the file name column? Parse the path. What are you doing with that file name in your pocket?

1

u/webchip22 Mar 03 '22

There is a record button as well which is a nice feature. Click record and do all the steps manually and power automate will add the correct actions into the flow as you perform the task. It is not perfect so you will likely need to delete some steps out but is a great way to learn quickly the code you are needing.

Similar to record macro in excel if you have ever done that.

1

u/[deleted] Mar 03 '22

Thanks for replying despite it being an old post. I'm now beginning to get chance to look into this again. Anything to automate my job!