Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.