Skip to content

Instantly share code, notes, and snippets.

View Nef132's full-sized avatar
💯
Trappin Hard💪🏾💪🏾

Nef132

💯
Trappin Hard💪🏾💪🏾
View GitHub Profile
@Nef132
Nef132 / pyBackup.py
Created April 28, 2019 21:16
Instant backup #python
import zipfile
z = zipfile.ZipFile('my-archive.zip', 'w', zipfile.ZIP_DEFLATED)
startdir = "/Users/owner/Devspace/"
for dirpath, dirnames, filenames in os.walk(startdir):
for filename in filenames:
z.write(os.path.join(dirpath, filename))
z.close()