Skip to content

Instantly share code, notes, and snippets.

@yukikaoru
Created May 13, 2023 11:35
Show Gist options
  • Save yukikaoru/5bb53bcdb6b1d238eedd96dedc4677af to your computer and use it in GitHub Desktop.
Save yukikaoru/5bb53bcdb6b1d238eedd96dedc4677af to your computer and use it in GitHub Desktop.
Dropboxの無視ファイルに追加するためのスクリプト

Dropboxの無視ファイルに追加するためのスクリプト

使い方

  1. dropbox-ignore.ps1を好きなとこに置く。
  2. "\path\to\pwsh.exe" -ExecutionPolicy RemoteSigned -File \path\to\dropbox-ignore.ps1でショートカットリンクを作る。
  3. 作ったショートカットに無視したいファイルをD&Dする。
foreach($path in $args) {
if (Test-Path "$path")
{
Write-Host "--- $path is dropbox ignores ---";
Set-Content -Path "$path" -Stream com.dropbox.ignored -Value 1;
}
}
Pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment