Created
December 12, 2011 23:35
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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