cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn about updates that we've made to the Search experience on the Android and iOS apps?Well, you can learn from Luke on the Mobile App team right here.

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.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

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

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

ppan
Explorer | Level 3

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

8 Replies 8

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

Megan
Dropboxer

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. 


Megan
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: What do you think about the Community? Fill out our survey here!

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

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

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

Jay
Dropboxer

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

Jay
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: What do you think about the Community? Fill out our survey here!

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

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.

 

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

Hannah
Dropboxer

Hey @ppan, thanks for clarifying this.

 

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


Hannah
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: What do you think about the Community? Fill out our survey here!

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

ppan
Explorer | Level 3

Yes, you can send me an Email.
However, did you try it yourself using PowerShell?
You can just use the path to any file in the local dropbox.
For example, I tried this simpler path and I get the same error:

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

 

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

Hannah
Dropboxer

No worries, I just sent you an email, so we'll investigate this further.

 

When you have a moment, please reply back to me.

 

Thanks!


Hannah
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: What do you think about the Community? Fill out our survey here!

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

ppan
Explorer | Level 3

The E-mails to my forum E-mail address are forwarded to another E-mail address.

I responded from that E-mail address.
Did you test PowerShell yourself, e.g. using:

 

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

 

 ?
EDIT: I have been using Windows 7 (64 bit). I just tried it on a Windows 10 PC and I didn't get the error.
However, Dropbox then deleted the file (options.ini)!
That is not what I had expected. I just wanted to exclude the file from syncing!?

Who's talking

Top contributors to this post

  • User avatar
    ppan Explorer | Level 3
  • User avatar
    Hannah Dropboxer
What do Dropbox user levels mean?
Need more support?