CSV Files List Generator from Folders and Subfolders
Project description
CSV Files List Generator from Folders and Subfolders
GitHub Repo: https://github.com/sannjayy/python_export_file_info
Installaion
Do the following in your virtualenv:
pip install python-export-file-info
Import:
from python_export_file_info import FileListGenerator
Minimal Code Example:
from python_export_file_info import FileListGenerator
myfolder = FileListGenerator(folder='/home/')
myfolder.generate()
Generate Options:
Syntax | Default | Options | Description |
---|---|---|---|
monitor | False | True / False | Show process bar on terminal. |
filename | exported_list.csv | any .csv | Output CSV Filename. |
index | True | True / False | Add ID column. |
file_prefix | None | any | Prefix of file column. |
-
After the name .csv extension is required*.
-
/dir/myfile.mp3
file_prefix='new/sub/'
new/sub/dir/myfile.mp3 -
Default Output Folder: output/ [In Project Root].
Full Code Example:
from python_export_file_info import FileListGenerator
scan_folder_path = r"C:\Users\sannjayy\Desktop"
myfolder = FileListGenerator(folder=scan_folder_path, output_path='newpath/')
myfolder.filter_extensions = ('.mp4', '.mp3')
myfolder.generate(monitor=True, filename='pyfiles.csv')
-
To Filter Files by Extensions [Optional]:
folder.filter_extensions = ('.mp4', '.mp3', '.jpg')
. -
To change the default output path use
output_path='newpath/'
DEMO OUTPUT:
Exported demo csv file structure.
ID | Name | Extention | Size | File | CRC32 (hash) | SH1 (hash) | MD5 (hash) | Modified Date | Created Date |
---|---|---|---|---|---|---|---|---|---|
1 | myfile | .mp3 | 4.29 MB | /dir/myfile.mp3 | 362... | 8dcdb... | 1a717... | 2022-06-19 13:33:12 | 2022-05-19 10:45:12 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python_export_file_info-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a1fcb6e6d8d49177ee1b452afd4d2ccaed6543aacbb78f4eb3f4883631f35d5 |
|
MD5 | e11dd7c8b69c47a9ae03cbcaa0aaac2f |
|
BLAKE2b-256 | 266eb76c16c3c35e1bea9924d07a19d9fd2e358f1466ba8294942aba8ccf4d44 |
Close
Hashes for python_export_file_info-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac15336bd8f30e4c909f250f7275a8d6403c57f0d91eed1650784c25be28da1f |
|
MD5 | e934758aefc70e4779a1621b6625829b |
|
BLAKE2b-256 | e8049c05b8e9557d731c8dec33338ae1efe835572159ac46a16a922328af14c9 |