I have my Eclipse IDE workspace stored on Dropbox, this way I can access the same environment from multiple computers. Recently Dropbox is stuck syncing the write.lock file in the Eclipse workspace's .metadata folder. Dropbox says can't sync "write.lock" (access denied). Does anyone know how to fix this? It is quite annoying because it means the Dropbox taskbar icon constantly the syncing icon... Thanks for helping!


That appears to be a temporary file created by Eclipse; it indicates that an instance of the IDE is currently operating on the workspace. Dropbox can't sync it because Eclipse is holding it open - that's the point of it being a lock.

If you aren't using any Eclipse plugins that store settings in .metadata, you can use Dropbox's Selective Sync feature to exclude that folder from synchronization. Selective Sync is in the Dropbox preferences, on the Account tab.

account tab

Uncheck the .metadata box in the Selective Sync folder tree to make your computer not try to upload it.

enter image description here

  • I don't know if the .lock file is temporary, because whenever I try to delete it, the next time I run Eclipse it gets created again. And even after closing all Eclipse sessions, Dropbox still cannot upload it! I need the .metadata folder synced, as it means I can open Eclipse on one computer and have it exactly configured like I left it when I used another computer. – space_voyager Dec 28 '15 at 20:07
  • @space_voyager Right, Eclipse always creates it because it's used to indicate that the workspace is in use. Nothing important is written to that file, though. At the moment, I'm working on finding a way to exclude one file. Perhaps this other SU answer will help you? – Ben N Dec 28 '15 at 20:22
  • It doesn't help. Windows does not let me create a folder called .lock saying "I must type a folder name". – space_voyager Dec 28 '15 at 20:30
  • @space_voyager Open a command prompt and use md; it'll let you make a folder with a leading period. (Remove it with rd.) – Ben N Dec 28 '15 at 20:31
  • I created it successfully and excluded both write.lock and .lock from syncing (see i.imgur.com/DCV4dQl.png), but still no luck - dropbox is still trying to sync the file. – space_voyager Dec 28 '15 at 20:35

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.