Skip to main content

CSV File Info List Generator from Folders and Subfolders

Project description

CSV File Info List Generator from Folders and Subfolders

Export file's informations from Didirectory rectory and subdirectory with process monitor.

Currently only .csv format supported for output/export.

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 optional.

  • /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


Developed by Sanjay Sikdar.

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

python_export_file_info-0.0.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_export_file_info-0.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file python_export_file_info-0.0.5.tar.gz.

File metadata

  • Download URL: python_export_file_info-0.0.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for python_export_file_info-0.0.5.tar.gz
Algorithm Hash digest
SHA256 363c71bed2fc0e9be97dd99d868992594d656361f068d0063c8f84898188c446
MD5 bb1507100c4a671a799b1c28e2f3efbc
BLAKE2b-256 a132861b765c7b8c4467ff2ba90c3ae8c27ba5e60d48aa381440dc2c236b334e

See more details on using hashes here.

File details

Details for the file python_export_file_info-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_export_file_info-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 97fe213759f5bdb4c45d9c7d4502b51b6f74820f3add310c9b5d1bb317ef1506
MD5 7471142273e8cd5b351ca55c0e960279
BLAKE2b-256 5a231841a8ce103aecbe92a7268de351f0a3dac7188603dc2f2b793caf16d3c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page