cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
frixel
Level: Powered On

How to integrate (Strip Dots and Special Characters from File Names) into my flow

I have make and follow the flow from Alan https://www.alanps1.io/power-platform/flow/flow-strip-dots-and-special-characters-from-file-names/

 

I have been trying all day to integrate this flow of my own, but I just can't succeed.

 

I have a number of files on the OneDrive, sometimes with a dot (.) In them.

I would like to see them being renamed, but I don't want to succeed.

 

This is how i trying now.

 

flow6.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi Frixel.

Might be best to “accept as solution” on this one and start a new thread in that case as the initial question has been answered I’d say and it’s best to help the community search algorithm in that way for future users.

Thanks, Alan.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

26 REPLIES 26
Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel , If another comes in and helps here then great.

Otherwise I will have a look in a few hours when I return from work.

 

Just letting you know.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel , can I ask, how many files are there in your OneDrive that you need to rename in this way please?

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

That is different but usually it is between 1 and 30 Files......

Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel , so I have this working for you. 

It will take me till tomorrow to type it up and get it posted in the forum but tomorrow isn't too far away at all.

 

I shall catch up with you then ...

 

If you have found my post helpful, please mark thumbs up.

 

Any other questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

okay, I'm waiting full of expectation

Community Support Team
Community Support Team

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel ,

 

Do you want to remove all the special characters from the file name?

 

I have set up the flow likes below for your reference.

Input the following code in the Initialize variable action:

createArray('.','@','ß','²','³','µ','´','°','^','=','(',')','&','$','§', '~','#','%','*',':','<','>','?','/','|',' ')

Add initialize variable2 and Initialize variable3.

 

Within Apply to each, add Set variable2, select filename for Name, and dynamic content Display name for Value.

 

Add Compose 2 with the following code:

split(items('Apply_to_each')?['Name'],'.')

 

Add Compose 3 with this code:

concat('.',last(outputs('Compose_2')))

 

Add Apply to each2, select value from variable character.

 

Add action set variable, name set as Test, Value with the following code:

replace(variables('filename'),items('Apply_to_each_2'),'')

 

Add set variable3, name set as filename, value set as variable test.

 

Under apply to each 2, add a compose action, set its input as variable filename.

 

Add compose 6 with the following code:

concat(outputs('Compose_5'),outputs('Compose_3'))

1.PNG2.PNG3.PNG

 

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Thank you, I will start again, but this one is different from Alan's.

I only miss the part that I am unable to resolve and that is replacing the file without a dot on the onedrive.

 

flow7.png

Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel & @v-yamao-msft (Mabel).

Frixel is working from a blog post of mine and wants to enhance it to rename OneDrive files.

 

As explained in post 5, I have created the exact working solution and will type it up and post it as soon as I get a moment. It was completed late last night and I am working at present, so the solution will be up very very soon!

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel .

 

Here is a working solution

https://www.alanps1.io/power-platform/flow/flow-rename-files-in-onedrive-for-business-that-have-dots...

 

As always ...

 

If you have found my post helpful, please mark thumbs up.

 

If this post has solved your problem, please click "Accept as Solution".

 

Any other questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

That is very great what you have made Alan.

 

I am still trying it out and I am now at the next step.

However, I do not understand why, because that to include a dot and an @ at contains.

They are also in the array, right?  why again?

 

flow7.png

Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi @frixel , no problem.

The "Or" part of the condition can come out in your case.

 

I am really just trying to demonstarte that if aother special characters were there they can be removed in this way.

It won't do your process any harm having it there but for others in the future, they may want to strip out more than dots hence why I have added it.

 

Trying to make the blog post good for years to come really. 

 

Hope that makes sense and please @frixel , be sure to mark as a solution once it's tested.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Yes i understood it now.

 

See my flow, it say it is running succesfuly but when the flow is ready there is only a extension.

The new file has no file name only .xlsx.

What do i wrong?

 

(Again, sorry for my bad english)

 

flow8.png  

 

flow9.png

Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi Frixel.

What you have posted is not identical to the process I have described in the blog. You have too much outside the yes branch of the condition. Please look back over my process and fix yours to match mine (exactly) and it will work.

Also the @@@@@@. There is ... next to that line. (Elipses). Click and delete that part perhaps.

For this free help ... please say thanks with thumbs up.

Thanks, Alan.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Thanks Alan.

Tomorrow i check it again and again.
You dat i can delete the condition with the @ and the dot?
Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi Frixel ... you need the part of the condition with the dot. Not the part with the @ although it is doing no harm. Just create exactly as I have and it will work 100%

Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Okay, I checked everything and made the adjustments and it works now. Smiley Happy

 

However, it only works if .xlsx files are renamed.
If there is a .xls file in the folder, the flow removes the dots perfectly but it also makes a .xlsx of it and then it goes wrong.
It can then no longer be opened by excel.

 

Is it to resolved that .xls files will be saved as .xls file?

 

Flow1.png

Super User
Super User

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

Hi Frixel. You are correct. I will add that to the blog later.

But if you look at the other processes I have created with you in mind and my other blogs I demonstrate how to get the file extension. Otherwise, I will enhance the blog post later to work for any file format and let you know.

Thanks, Alan.

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

That would be great if you wanted to do that.Smiley Happy

 

In the meantime I will of course try to keep the extension file as it is from your other blog.

 

But whether I will succeedSmiley Frustrated

frixel
Level: Powered On

Re: How to integrate (Strip Dots and Special Characters from File Names) into my flow

I tried to adjust the flow with the help of your other blog.

Given the error message, I am not doing something right, but I cannot find out what it is.

Perhaps the question is whether I am doing so well?

 

Flow2.png

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 463 members 4,962 guests
Please welcome our newest community members: