cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

One drive "create file" replaces old file in the source folder

Hi,

I am have created a Flow, which uses "Create CSV Table" and then store the output as a file in a One Drive folder using One Drive "Create File".

The data is coming from a SharePoint list. The Flow triggers when a new item is created.
Problem:

Each time the flow runs it replaces the old file in the source folder.

Issue.jpg

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

@Soumodip 

To preserve the original file, consider adding something like the current date and time after the EmployeeName name in the action.  You'll enter utcNow() in the expression window.  It should look something like this:

Filename.png

 

Be sure to click on Update after entering utcNow() in the expression window.

Another alternative is just to let the file be overwritten.  Versioning is turned on by default in OneDrive for Business.  Creating the new file with the same name should just add a version to the existing file (double check me on this...)

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Helper I
Helper I

Sorry!
I had made a silly mistake. I was getting the file name from after "Get item", which was returning the same name.

I fetched the name from "When an item is created" and that solved the problem!

View solution in original post

3 REPLIES 3
Super User III
Super User III

@Soumodip 

To preserve the original file, consider adding something like the current date and time after the EmployeeName name in the action.  You'll enter utcNow() in the expression window.  It should look something like this:

Filename.png

 

Be sure to click on Update after entering utcNow() in the expression window.

Another alternative is just to let the file be overwritten.  Versioning is turned on by default in OneDrive for Business.  Creating the new file with the same name should just add a version to the existing file (double check me on this...)

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Helper I
Helper I

Sorry!
I had made a silly mistake. I was getting the file name from after "Get item", which was returning the same name.

I fetched the name from "When an item is created" and that solved the problem!

View solution in original post

Hi @ScottShearer,

This works too! Thanks.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,082)