Last active
March 3, 2020 01:11
-
-
Save xon52/1a821fda90ed4e6ad48ff8b4a5402178 to your computer and use it in GitHub Desktop.
Stop Syncing Dropbox Folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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