Skip to main content

Notifications

Power Automate - Using Connectors
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.

  • mwall Profile Picture
    mwall 2 on at
    Re: Cannot delete on premise file with File System Delete File

    @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

  • Re: Cannot delete on premise file with File System Delete File

    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.

  • Kthomas Profile Picture
    Kthomas 19 on at
    Re: Cannot delete on premise file with File System Delete File

    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"}}

     

     

     

  • Re: Cannot delete on premise file with File System Delete File

    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.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics