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 / Cannot delete on premi...
Power Automate
Unanswered

Cannot delete on premise file with File System Delete File

(0) ShareShare
ReportReport
Posted on by 19

Hello,

 

I have a data gateway setup and am successfully pulling a file from it and uploading its contents to SharePoint.  I want to delete the on premise file after the process, however I cannot get it working.  I have tried using the delete file function and placing the 'list files' ID, Path, Name, even DisplayName and no luck.  It either says it cannot find the file, or when I choose Name, it says success but the file does not delete.  

 

Kthomas_0-1611783043454.png

 

Here is the error.   

 

 "body":{"status":400,"message":"The requested action could not be completed. Check your request parameters to make sure the path 'E:\\Code\\Powershell\\Career Services Upload\\Upload/Alumni-1-27-2021.csv' exists on your file system.\r\nclientRequestId: 514b3371-62c4-48a7-ad32-203494d005bb","error":{"message":"The requested action could not be completed. Check your request parameters to make sure the path 'E:\\Code\\Powershell\\Career Services Upload\\Upload/Alumni-1-27-2021.csv' exists on your file system."},"source":"filesystem-wus.azconn-wus-01.p.azurewebsites.net"}}

 

That path does work on my file system, and is working on my get file content component.  

 

Thanks.

Categories:
I have the same question (0)
  • v-yiwenxie-msft Profile Picture
    Microsoft Employee on at

    Hi @Kthomas 

     

    The value you should put in the ‘File’ in ‘Delete file’ action should be the path of the file which you can get from dynamic content.

     

    1.28-1.PNG

     

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

  • Kthomas Profile Picture
    19 on at

    Thanks for the feedback.  Path did not work either.  

     

    Kthomas_0-1611853094305.png

    Kthomas_1-1611853148221.png

     

     

    {"status":400,"message":"The requested action could not be completed. Check your request parameters to make sure the path 'E:\\Code\\Powershell\\Career Services Upload\\Upload/Alumni-1-27-2021.csv' exists on your file system.\r\nclientRequestId: 57fd9cf4-33c9-4bfa-825a-7d69e3d97b95","error":{"message":"The requested action could not be completed. Check your request parameters to make sure the path 'E:\\Code\\Powershell\\Career Services Upload\\Upload/Alumni-1-27-2021.csv' exists on your file system."},"source":"filesystem-wus.azconn-wus-01.p.azurewebsites.net"}}

     

     

     

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

    Hi @Kthomas 

     

    I've tried every effort to reproduce the error you get, but still couldn't reproduce it.

     

    Every error occurs at the 'Get file content' action.

     

    I previously thought that there is a bug in 'delete file' action. But every time when the file content has been got and the condition works well, 'delete file' works quite well.

     

    2.4-12.PNG

     

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

  • mwall Profile Picture
    2 on at

    @Kthomas I am curious if you ever found the issue? I am encountering the same problem.  I have a logic app where I am connected to a local file share data gateway -- I am able to pick up a file, get the file content, create a new file in a different ftp location with the file content, but then the file won't delete from the local file share on my data gateway. I am using the List of File Paths to specify which file to delete. Here is my workflow with the File Delete action:

    mwall_0-1679518432407.png

    The strange part is that the workflow completes successfully if I am picking up files with the extension .txt. However, the files I am trying to pick up are .csv and for whatever reason, this causes the file deletion to fail with the same error message you receive. I also tried using the List of File Names to specify the file to delete, but got the same result as you: Successful run but the file was not actually deleted.

     

    Curious if you found a solution to this strange issue?

     

    Thanks!

    Meredith

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 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard