Skip to content

Automates the extraction of compressed files (which may not have the correct extension) within a folder

License

Notifications You must be signed in to change notification settings

TiagoCavalcante/extract-folder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Compressed File Extractor

This project provides a Python script that automates the extraction of compressed files (which may not have the correct extension) within a given directory. It supports both gzip and zip formats, making it particularly useful for processing archives, such as those downloaded from the Internet Archive via the wayback_machine_downloader.

Prerequisites

Before running the script, ensure you have Python 3 installed on your system. Additionally, the script uses the magic library for MIME type identification, so make sure to install this dependency:

python3 -m pip install python-magic

Installation

No installation is needed. Just download the script file or clone this repository:

git clone https://github.com/TiagoCavalcante/extract-folder

Usage

To use the script, navigate to the directory containing the script in your terminal and execute the following command:

python3 script.py <folder_path>

Replace <folder_path> with the path to the directory containing the compressed files you wish to extract.

Additional Information

To download files from a site in the Internet Archive, you can use the wayback_machine_downloader with the following commands:

sudo apt install ruby-rubygems
sudo gem install wayback_machine_downloader
wayback_machine_downloader -a URL -p 1000 -s

Replace URL with the target website's URL.

About

Automates the extraction of compressed files (which may not have the correct extension) within a folder

Topics

Resources

License

Stars

Watchers

Forks

Languages