web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy a single file fro...
Power Automate
Answered

Copy a single file from FTP to Google Drive

(0) ShareShare
ReportReport
Posted on by 12

I need to watch a folder on an FTP server. I use the trigger and pass it on to create a file on Google drive.

Then every file that is created or changed on the folder is copied over. I don't need them and it is not compliant.

Only one file I need to watch (it is updated every 5 hours) and it is not an option to put that file in a single folder.

So, I used the Condition and put in the CASE = yes the filename that I want. Next is adding the file to the Google drive. But all the files, including the wanted file are ending up in the CASE = no box. 

Any suggestions? 

Categories:
I have the same question (0)
  • Verified answer
    AlanPs1 Profile Picture
    2,471 on at

    Hi @JeroenKrah, thank you for posting this.

     

    If I am understanding correctly you say "So, I used the Condition and put in the CASE = yes the filename that I want. Next is adding the file to the Google drive. But all the files, including the wanted file are ending up in the CASE = no box."

     

    I am understanding that you only want the one file that updates every 5 hours to move to google drive, not the rest?

     

    I have had a look and have created a condition that will get just 1 file from the FTP folder.

     

    Here is an explation firstly as to why it has been handles in the way:Capture-251.png

    FTP returns the file name in base 64 format, so it needs converting before the real file name will match.

    Please see below on how I have done this:

    Capture-253.png

    You will see below the new output of the file when I have used base64ToString() to convert the file name.Capture-254.png

     Without the conversion, any condition you will write will try and match "ZmlsZTEyMTM0NTYucGRm" (in my example) as the file name.

     

    With the above set up just one file is targetetd and it moves to google drive. I am not sure how Google drive will handle overwriting the file, in my testiong it errored if file name existed already but at least now you can maybe write a condition that is more likely to match on file name.

     

    Thanks, Alan

  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @JeroenKrah,

     

    I agree with @AlanPs1's solution for encoding the file name.

    Have problem been solved?

    If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    If no, please feel free to ask for help here.

     

    Best regards,

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • JeroenKrah Profile Picture
    12 on at

    Hi Alan,

    Thank you for this! You are correct in your assumtion.

    I will work and implement it.

    Strange that it is not built in the flow itself.

    On my Google Drive I have a sheet that imports the csv file (with SheetIE addon) and then deletes the file. So, no issues with the existing file (I had the error as well). Interesting is that GD can also host multiple files with the same filename. In the windows synch folder the have a number added (filename(2).csv, filename(3).csv, etc..) 

    I let you know.

     

    Jeroen

  • JeroenKrah Profile Picture
    12 on at

    Hi Alan,

     

    I get an error on the condition box. It tells me that the (I need to translate it from Dutch) template expression can not be processed because the function outputs is not defined or valid. I tried to use the Dutch translation for outputs which is 'uitvoer' but that gave the same error. The filename in question is called Reporting_Entry.csv.

     

    error2.jpg

    error1.jpg

    error3.jpg

     

     

     

    As you can see, I am also not getting 'outputs' as a function in the list.

     

    Jeroen

     

     

  • JeroenKrah Profile Picture
    12 on at

    Hi Alan,

    I figured it out, and it works. I left in the expression 'Compose_File_Name', which is of course the name of the action as you named it. So, I changed it in the name of my action and that did the trick.

    Thanks so much for your help.

     

    Jeroen

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 598

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard