| 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}") | |