You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ppan's avatar
ppan
Explorer | Level 3
2 years ago

Error when trying to exclude a file using PowerShell (on Windows 7)

I am trying to exclude a file from syncing following the instructions here:
https://help.dropbox.com/sync/ignored-files
using the PowerShell command:
Set-Content -Path 'Set-Content -Path 'D:\Dropbox\x\x\x\x\options.ini' -Stream com.dropbox.ignored -Value 1' -Stream com.dropbox.ignored -Value 1

However, I get a PowerShell error:
Set-Content : A parameter cannot be found that matches parameter name 'Stream'.
At line:1 char:86
+ Set-Content -Path 'D:\Dropbox\x\x\x\x\options.ini' -Stream <<<< com.dropbox.ignored -Value 1
+ CategoryInfo : InvalidArgument: (:) [Set-Content], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SetContentCommand

  • Megan's avatar
    Megan
    Icon for Dropbox Staff rankDropbox Staff

    Hi ppan, happy Monday, I hope you're doing well! 

     

    Interesting. Is your Dropbox desktop app open and running? If so, what is the syncing status as we speak? 

     

    Please, feel free to also send me a screenshot of the error you get on your end, so I can have visual too. 

     

    Let me know more, and we'll take it from there. 

    • ppan's avatar
      ppan
      Explorer | Level 3

      This is not an error with Dropbox, but with windows PowerShell. (I was following the instructions on Dropbox website as I explained above).

      I also wrote the exact PowerShell error in my post above.

      A screenshot will not show anything new (except reveal personal details - that is why I replaced part of the path with "x"))

  • Jay's avatar
    Jay
    Icon for Dropbox Staff rankDropbox Staff

    Hi ppan, according to your original command, you wrote Set-Content -Path twice, which is why this error is occurring.

     

    Try formatting the command correctly like so, and it should work.

     

     

    Set-Content -Path 'D:\Dropbox\x\x\x\x\options.ini' -Stream com.dropbox.ignored -Value 1
    • ppan's avatar
      ppan
      Explorer | Level 3

      Sorry, I typed it wrong in the original post (and I am not able to edit it). The command that I used was indeed:

       

      Set-Content -Path 'D:\Dropbox\x\x\x\x\options.ini' -Stream com.dropbox.ignored -Value 1

       

      I tried it again. Same error.

       

      • Hannah's avatar
        Hannah
        Icon for Dropbox Staff rankDropbox Staff

        Hey ppan, thanks for clarifying this.

         

        May we send you an email, so we can look into this internally?

About Apps and Installations

Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.

Need more support

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!