File size: 492 Bytes
ada6443
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import zipfile
import os

# Specify the path to the .zip file
zip_file_path = "cspc_db.zip"

# Specify the directory where you want to extract the files
extract_to_path = "cspc_db"

# Check if the destination directory exists, and if not, create it
if not os.path.exists(extract_to_path):
    os.makedirs(extract_to_path)

# Unzip the file
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
    zip_ref.extractall(extract_to_path)

print(f"Files have been extracted to: {extract_to_path}")