Skip to content

Instantly share code, notes, and snippets.

@fjorgemota
Created December 12, 2011 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjorgemota/1469666 to your computer and use it in GitHub Desktop.
Save fjorgemota/1469666 to your computer and use it in GitHub Desktop.
Apaga todos os arquivos com "conflicted" no nome. Que o Dropbox costuma gerar quando há dois usuários editando o mesmo arquivo
import os, os.path
def ren(path):
files = os.listdir(path)
for f in files:
if f in (".",".."):
continue
f = os.path.join(path,f)
if os.path.isdir(f):
ren(f)
else:
if "conflicted" in f:
print "Removendo ",f
os.remove(f)
ren(".")
raw_input()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment