I'm create(modifed your) backup module.
He is...worked =)
Code: Select all
label backup_project:
python hide:
import os
import time
import shutil
# Tell the user we're cp...
title(u"Backup data...")
store.message = u"Please, don't move =)"
ui.pausebehavior(0)
interact()
try:
os.mkdir("%s_backups") % project.name
store.message = _(u"%s_backups/") % project.name
except:
pass
while True:
bdtime = str(time.strftime("%d-%m-%Y_%H:%M",time.gmtime())) # on Win32 in NTFS and FAT a symbol ":" is a not allowd
bdir = _(u"%s_backups/%s") % (project.name,bdtime)
if not os.path.exists(bdir):
break
time.sleep(1)
shutil.copytree(project.path, bdir)
store.message = _(u"The backup was placed into %s.") % bdir
jump tools_menu