How to archive files with Python – Archiviare file con Python

Python to archive files

archive python shutil os glob
archive python shutil os glob

Module to import

First, let’s impor os, glob and shutil

Iteration

With the for (each) loop we move each file in archive.

try except

If there is no folder “archive”, it is created