Dropbox files & folders
Get in sync with the Dropbox Community. Our members can answer all your questions on Dropbox files and folders. Join a discussion or start your own today.
Just like we have .gitignore for preventing files / folders to be uploaded to github, it would be nice to have the same for DropBox.
I have a workspace folder with tons of node_modules folders.
I want to upload the workspace folder to my DropBox but want to skip the node_modules folders.
Is there a way to achive this by making some .dropbox-ignore entry in my workspace's folders ?
That would be really helpful. Thanks.
Solved! Go to Solution.
This might be useful for others on Windows and Powershell with the git command line tool installed.
The script finds all .gitignore files in current folder and subfolder and sets the ignored files and folders to not upload to Dropbox.
Get-ChildItem -Recurse | ` Where-Object { $_.Name -eq '.gitignore' } | ` ForEach-Object { ` Write-Host $_.DirectoryName; ` Push-Location $_.DirectoryName; ` git status --ignored --short | ` Where-Object { $_.StartsWith('!! ') } | ` ForEach-Object { ` $ignore = $_.Split(' ')[1].Trim('/'); ` Write-Host $ignore; ` Set-Content -Path $ignore -Stream com.dropbox.ignored -Value 1 ` }; ` Pop-Location }
You can paste this into say `dropbox-sync-ignore.ps1` and store in your PATH and run it whenever you start or update a project in git.
DropBox should come up with an update that provides this out of the box. Right now running this
xattr -w com.dropbox.ignored 1 /Users/yourname/Dropbox/workspace/react-project/node_modules
for every node project manually is a pain.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!