GithubHelp home page GithubHelp logo

dropbox-ignore's Introduction

Overview

Dropbox allows you to ignore certain files and folders from beind synced. In most development environments we deal with directories containing thousands of files that can create a bottleneck in a development pipeline. What we will achieve here is an approach to ignoring folders that should not be added to the remote dropbox folder.

Example

When working with nodejs we'll often install hundreds of packages via npm which can add up to be many MBs of files. Not only is it heavy on storage, these all also need to be synced for every user who has access to this folder, whether they are working on that particular folder or not. By using the dropbox ignore, we can keep the node_modules folder LOCAL ONLY.

Setup

The Script

Clone this repo and put it somewhere easy to find. "c:\automations\dropbox-ignore" will be used for the samples below.

Setup the context menu

Creating a context menu item involves adding registry keys to HKEY_CLASSES_ROOT\Directory\shell The keys within this are what generates the dropdown menu found in windows.

Create two context menu entries:

  1. Add two registry keys to HKEY_CLASSES_ROOT\Directory\shell\

    • Computer\HKEY_CLASSES_ROOT\Directory\shell\DropboxIgnore
    • Computer\HKEY_CLASSES_ROOT\Directory\shell\DropboxUnignore
  2. Set the default values for these commands to be display names

    • Dropbox Ignore Folder
    • Dropbox Unignore Folder
  3. Create sub-keys for each called "command" and set the value to the below commands

    • The command for the Ignore script should be:

      PowerShell.exe  -File "C:\automations\dropbox-ignore\ignore-directory.ps1" "%V"
      
    • The command for the Unignore script should be:

      PowerShell.exe -File "C:\automations\dropbox-ignore\unignore-directory.ps1" "%V"
      
  4. (optional) Add Icons

    • Create a new string value inside both parent keys named "Icon".
    • Set the value to "C:\Program Files (x86)\Dropbox\Client\Dropbox.exe" ( or the path to your dropbox exe )

Run the script

Right click on a test folder that is currently synced to dropbox. You should see a green checkbox on the bottom left of the folder icon. Click the "Dropbox Ignore Folder" item. A powershell prompt should popup briefly and close, showing that it's running. After a moment, the green sync icon should be replaced by a gray minus sign icon.

dropbox-ignore's People

Contributors

franklin113 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.