cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
yoshihirok
Level 10

Copy a file from Local file server to OneDrive for Business every morning

This flow copy a file from Local file server to OneDrive for Business every moning.

1.png

 

 

Prepare:

1. Install 'Data Gateway' to your local file server.

  'Data Gateway' can download from Flow web site.

  and Install the 'Data Gateway'

  1.png

 

Flow

1. Trigger : Schedule - Recurrence

  Frequency: Day

  Interval: 1

  Timezone: <your time zone>

  Start Time: <your start time>

2. Action : File System - Get File Content

  File: <your file path on Local file server>

  My connections: <your file system connection>

3. Action : OneDrive for Business - Delete file

  File: <your file path on OneDrive for Business>

4. Action : OneDrive for Business - Create file

  Folder path : <your folder path on OneDrive for Business>

  File name : <your file name on OneDrive for Business>

  File content : [Get file content - file content]

  Configure run after : is successful, has failed

Detail of step.

Step 1

Timezone : your time zone like (UTC+09:00) Osaka, Sapporo, Tokyo

Start Time : your start time of this flow like 2017-01-01 10:00

Step 2

-- SET connection for your local file server --

To add a connection for your local file server,

select ... of this File System action,

and select 'Add new connection'

 

1.png

 

and Setup the new connection,

Check 'Connect via on-prsmise data gatewya',

Input all parameters.

 1.png

 

 Step 3.

  File : your file path on OneDrive for Business, like \FlowTest\a.txt

 Step 4.

  Folder path : your folder path on OneDrive for Business, like \FlowTest

  File name : your file name on OneDrive for Business, like a.txt

  File conent : Dynamic content 'File content' of Get file content

  and select ...

  and select 'Configure run after' of this action.

  1.png

 

and check 'is successful' and 'has failed' of 'Delete file' action

and select Done.

1.png

 

More scenario:

When Other cloud storage instead of OneDrive for Business, you can change the actions for the storage.

When copy per hour instead of day, you can change schedule - recurrence freaquency to hour from day.

When copy multiple files, you can add actions for each file.

 

Regards,

Yoshihiro Kawabata

 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Administrator
Administrator

Re: Copy a file from Local file server to OneDrive for Business every morning

Wow! This is a realllly useful Flow!

 

Thanks for sharing it with us Yoshihirok!

Administrator
Administrator

Re: Copy a file from Local file server to OneDrive for Business every morning

5 REPLIES 5
Administrator
Administrator

Re: Copy a file from Local file server to OneDrive for Business every morning

Wow! This is a realllly useful Flow!

 

Thanks for sharing it with us Yoshihirok!

lafaix
Level: Power Up

Re: Copy a file from Local file server to OneDrive for Business every morning

hy,

i don't find the link for donwload "data gateway" Smiley Sad

Administrator
Administrator

Re: Copy a file from Local file server to OneDrive for Business every morning

wcsmith
Level: Powered On

Re: Copy a file from Local file server to OneDrive for Business every morning

I have tried this along with other options and I can't seem to get this to work.  I keep getting an error on the 'get content' section and it shows Bad Request with error 400.  Any ideas??  

 

{
  "status"400,
  "message""The requested action could not be completed. Check your request parameters to make sure the path 'C:\\Users\\wcsmith\\Documents/2018 Goals New - Copy - Copy - Copy.xlsx' exists on your file system.\r\nclientRequestId: be573bfa-484e-4adb-a972-d88c3a049230",
  "source""filesystem-wus.azconn-wus.p.azurewebsites.net"
}

wcsmith
Level: Powered On

Re: Copy a file from Local file server to OneDrive for Business every morning

I was able to figure it out.  It was the location settings in my gateway.

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

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!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

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: 191 members 4,420 guests
Please welcome our newest community members: