cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

File to Folder Based on File Name

Hi all,

 

I would like to have files that are uploaded in the first folder to go into another folder depending on the name. All of the files going in the first folder begin with numbers.

 

So if the name of one file is 102345, it will go in file name "10". If the name of another file is 112345, it will go in file "11". I tied to initialize variable to turn the folder name into a "string" but that didn't work. It keeps "Applying to each" which doesn't work. Any thoughts?

 

Capture.PNGCapture2.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
JohnAageAnderse
Memorable Member
Memorable Member

Hello @Anonymous 

Did you find a solution to your need or is it still relevant?

It looks like you should be able to move the file to the correct folder by taking the first 2 symbols from the filename and use it as the folder name.

Let us hear back from you 🙂

Kind regards, John

View solution in original post

4 REPLIES 4
JohnAageAnderse
Memorable Member
Memorable Member

Hello @Anonymous 

Did you find a solution to your need or is it still relevant?

It looks like you should be able to move the file to the correct folder by taking the first 2 symbols from the filename and use it as the folder name.

Let us hear back from you 🙂

Kind regards, John

Anonymous
Not applicable

Hi @JohnAageAnderse ,

 

Thank you for the reply. Yes, that is one way to do it but I was hoping there was another way where I wouldn't have to manually put the number is starts with. The list will grow so the flow query would be extra long in the long run. I'm trying to avoid this problem.

 

Hope this makes sense.

Hello @Anonymous 

Could you explain a little more about the conditions that you expect to use in order to move files based on their filename. I understood that the filenames are always numbers and you use the first two digits to move the file into a folder. With two digits, there can ony be 100 folders (00-99), but please clarify this for me/us 🙂

 

Otherwise, I would go with another list having the values to look for in the start of a filename and a folder path in which to move the file should it match.

Kind regards, John

Anonymous
Not applicable

Thanks @JohnAageAnderse , I figured it out 🙂

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,750)