if(widgetStylesPrinted != true) {document.write('');}var widgetStylesPrinted = true;var content = '
debug_backup
python
  1. import os
  2. import time
  3.  
  4. source = ['F:\\\\PJ\\PythonPJ']
  5.  
  6. target_dir = 'F:\\\\PJ\\Backup'
  7.  
  8. target = target_dir + os.sep + time.strftime('%Y%m%d%H%M%S') + '.zip'
  9.  
  10. zip_command = "zip -qr {0} {1}".format(target, ' '.join(source))
  11.  
  12. print(zip_command)
  13. if os.system(zip_command) == 0:
  14. print('Successful backup to', target)
  15. else:
  16. print('Backup FAILED')
';document.write(content);