Skip to content

Instantly share code, notes, and snippets.

@xon52
Last active March 3, 2020 01:11
Show Gist options
  • Save xon52/1a821fda90ed4e6ad48ff8b4a5402178 to your computer and use it in GitHub Desktop.
Save xon52/1a821fda90ed4e6ad48ff8b4a5402178 to your computer and use it in GitHub Desktop.
Stop Syncing Dropbox Folder
# Introduction
Write-Host "------------------------------------------------" -ForegroundColor Green
Write-Host " Dropbox Desync." -ForegroundColor Yellow
Write-Host "------------------------------------------------" -ForegroundColor Green
# Target File/Folder
Write-Host "Enter the path to the folder/file you want to desync." -ForegroundColor DarkGray
Write-Host "Default: $PSScriptRoot" -ForegroundColor DarkGray
$target = Read-Host -Prompt "Enter path to desync (default)"
# Set current directory if none
if (!$target) {
$target = $PSScriptRoot
}
# Desync directory
Write-Host "Set-Content -Path $target -Stream com.dropbox.ignored -Value 1" -ForegroundColor DarkGray
Set-Content -Path $target -Stream com.dropbox.ignored -Value 1
# Directory desync'd
Write-Host "------------------------------------------------" -ForegroundColor Green
Write-Host " Desync complete" -ForegroundColor Yellow
Write-Host "------------------------------------------------" -ForegroundColor Green
$exit = Read-Host -Prompt "Press enter to exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment