List files recursively
pip install list-all-files-recursively
This module provides a function to retrieve information about files in a given folder and its subfolders.
The function get_folder_file_complete_path takes one or more folder paths as input and returns a list of named tuples.
Each named tuple contains information about a file found in the folder and its subfolders, including the folder path,
file name, complete file path, and file extension.
Example usage:
folders = [r'C:\cygwin', r'C:/cygwinx']
file_info_list = get_folder_file_complete_path(folders)
for file_info in file_info_list:
print(file_info.path)
Note: This function only works for local file systems and does not support remote file systems.
Args:
folders: A string or a list of strings representing folder paths to retrieve file information from.
maxsubfolders: An optional integer that limits the maximum number of subfolders to search in each folder.
Returns:
A list of named tuples. Each named tuple contains information about a file found in the folder and its subfolders,
including the folder path, file name, complete file path, and file extension.
Raises:
ValueError: If the input folder path is invalid or does not exist.
TypeError: If the input folders argument is not a string or a list of strings.
from list_all_files_recursively import get_folder_file_complete_path
fi = get_folder_file_complete_path(folders=[r'C:\Users\Gamer\anaconda3\bin',r"C:\yolovtest"])
for file in fi[:10]:
print(file.folder, file.file, file.path, file.ext)
C:\Users\Gamer\anaconda3\bin libLIEF.dll C:\Users\Gamer\anaconda3\bin\libLIEF.dll .dll
C:\Users\Gamer\anaconda3\bin omptarget.dll C:\Users\Gamer\anaconda3\bin\omptarget.dll .dll
C:\Users\Gamer\anaconda3\bin omptarget.rtl.level0.dll C:\Users\Gamer\anaconda3\bin\omptarget.rtl.level0.dll .dll
C:\Users\Gamer\anaconda3\bin omptarget.rtl.opencl.dll C:\Users\Gamer\anaconda3\bin\omptarget.rtl.opencl.dll .dll
C:\yolovtest devi.txt C:\yolovtest\devi.txt .txt
C:\yolovtest\backgroundimages 2022-10-14 13_13_09-.png C:\yolovtest\backgroundimages\2022-10-14 13_13_09-.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_17-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_17-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_39-.png C:\yolovtest\backgroundimages\2022-10-14 13_13_39-.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_46-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_46-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_54-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_54-Window.png .png
from list_all_files_recursively import get_folder_file_complete_path
fi = get_folder_file_complete_path(folders=[r"C:\yolovtest"])
for file in fi[:10]:
print(file.folder, file.file, file.path, file.ext)
C:\yolovtest devi.txt C:\yolovtest\devi.txt .txt
C:\yolovtest\backgroundimages 2022-10-14 13_13_09-.png C:\yolovtest\backgroundimages\2022-10-14 13_13_09-.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_17-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_17-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_39-.png C:\yolovtest\backgroundimages\2022-10-14 13_13_39-.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_46-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_46-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_13_54-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_13_54-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 13_14_25-Window.png C:\yolovtest\backgroundimages\2022-10-14 13_14_25-Window.png .png
C:\yolovtest\backgroundimages 2022-10-14 21_29_08-Greenshot.png C:\yolovtest\backgroundimages\2022-10-14 21_29_08-Greenshot.png .png
C:\yolovtest\backgroundimages 2022-10-14 21_29_21-Greenshot.png C:\yolovtest\backgroundimages\2022-10-14 21_29_21-Greenshot.png .png
C:\yolovtest\backgroundimages 2022-10-14 21_29_25-Greenshot.png C:\yolovtest\backgroundimages\2022-10-14 21_29_25-Greenshot.png .png
Metadata
Release files for list-all-files-recursively 0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| list_all_files_recursively-0.12.tar.gz | 4.7 kB | Without provenance | Details for list_all_files_recursively-0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| list_all_files_recursively-0.12-py3-none-any.whl | Python 3 | none | any | Details for list_all_files_recursively-0.12-py3-none-any.whl |
Total release size: 11.4 kB
Release files / list_all_files_recursively-0.12.tar.gz
| Download URL | list_all_files_recursively-0.12.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0569a8fb724c84cfd5e96af64e5968297ebfd0cb318a3f64bc7ac667cec53130
|
|
BLAKE2b-256 checksum How to use checksums |
2e608a7984d470a262f2d2f4d99f353156ef7459e593d056a8aad48679b28530
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / list_all_files_recursively-0.12-py3-none-any.whl
| Download URL | list_all_files_recursively-0.12-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ed13b06c109194421505e6e9f818162a93c26c9b47d2af0cb6e92b970f5d5bd
|
|
BLAKE2b-256 checksum How to use checksums |
6d56d1f402c7a0f2fb71154cb8318c113aa23645dd4cdf0e939b2cea3e3b615d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for list-all-files-recursively 0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.