How to delete Dropbox conflicted copy files in Windows

I use Dropbox daily.  It’s a great utility, I use it to sync files between 5 or more systems that I use on a regular basis.  In fact, I’ve found that it cuts build time way down when I’m setting up a new system, because I use PortableApps inside Dropbox.  The only downside is that when you’re running a PortableApp from two computers simultaneously, they tend to access a lot of the same files at the same time, creating “conflicted copy” files everywhere.  How to clean that up?

If you don’t care which copy is the “correct” or “latest” copy, there are simple commands you can use in Linux and Mac OSx to do wildcard matching, find those files and delete them.  But how about Windows?  I wrote a batch file that will do the same thing:

@echo off
dir /b/s | find "conflicted copy" > temp.dir

for /F "tokens=*" %%A in (temp.dir) do (
del /q "%%A"
)
del /q temp.dir

 

This will find all “conflicted copy” files, put them into a temporary file, then delete them one by one.  Finally it will delete the temporary file.

To use it, run the batch file from a command prompt inside your dropbox folder.  The script assumes you’re in the Dropbox folder already.

 

2 Replies to “How to delete Dropbox conflicted copy files in Windows”

  1. C:\Users\T-Bone\Dropbox\formaco4.com>@echo off
    dir /b/s | find “conflicted copy” > temp.dir

    for /F “tokens=*” %%A in (temp.dir) do (
    %%A was unexpected at this time.
    del /q “%%A”
    Could Not Find C:\Users\T-Bone\Dropbox\formaco4.com\%%A
    )

  2. I got the same error as above .. this line below worked only one % not a double %

    dir /b/s | find “conflicted copy” > temp.dir

    for /F “tokens=*” %A in (temp.dir) do del /q “%A”

Leave a Reply

Your email address will not be published. Required fields are marked *


*