list-all-files-recursively


Namelist-all-files-recursively JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/list_all_files_recursively
SummaryList files recursively
upload_time2023-04-06 01:56:15
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords search files recursively
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# List files recursively



```python

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.



```





```python

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



```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/list_all_files_recursively",
    "name": "list-all-files-recursively",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "search,files,recursively",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2e/60/8a7984d470a262f2d2f4d99f353156ef7459e593d056a8aad48679b28530/list_all_files_recursively-0.12.tar.gz",
    "platform": null,
    "description": "\r\n# List files recursively\r\n\r\n\r\n\r\n```python\r\n\r\npip install list-all-files-recursively\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```\r\n\r\n    This module provides a function to retrieve information about files in a given folder and its subfolders.\r\n\r\n\r\n\r\n    The function get_folder_file_complete_path takes one or more folder paths as input and returns a list of named tuples.\r\n\r\n    Each named tuple contains information about a file found in the folder and its subfolders, including the folder path,\r\n\r\n    file name, complete file path, and file extension.\r\n\r\n\r\n\r\n    Example usage:\r\n\r\n    folders = [r'C:\\cygwin', r'C:/cygwinx']\r\n\r\n    file_info_list = get_folder_file_complete_path(folders)\r\n\r\n    for file_info in file_info_list:\r\n\r\n        print(file_info.path)\r\n\r\n\r\n\r\n    Note: This function only works for local file systems and does not support remote file systems.\r\n\r\n\r\n\r\n\r\n\r\n    Args:\r\n\r\n        folders: A string or a list of strings representing folder paths to retrieve file information from.\r\n\r\n        maxsubfolders: An optional integer that limits the maximum number of subfolders to search in each folder.\r\n\r\n\r\n\r\n    Returns:\r\n\r\n        A list of named tuples. Each named tuple contains information about a file found in the folder and its subfolders,\r\n\r\n        including the folder path, file name, complete file path, and file extension.\r\n\r\n\r\n\r\n    Raises:\r\n\r\n        ValueError: If the input folder path is invalid or does not exist.\r\n\r\n        TypeError: If the input folders argument is not a string or a list of strings.\r\n\r\n\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n```python\r\n\r\nfrom list_all_files_recursively import get_folder_file_complete_path\r\n\r\nfi = get_folder_file_complete_path(folders=[r'C:\\Users\\Gamer\\anaconda3\\bin',r\"C:\\yolovtest\"])\r\n\r\nfor file in fi[:10]:\r\n\r\n    print(file.folder, file.file, file.path, file.ext)\r\n\r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\r\nC:\\Users\\Gamer\\anaconda3\\bin libLIEF.dll C:\\Users\\Gamer\\anaconda3\\bin\\libLIEF.dll .dll\r\n\r\nC:\\Users\\Gamer\\anaconda3\\bin omptarget.dll C:\\Users\\Gamer\\anaconda3\\bin\\omptarget.dll .dll\r\n\r\nC:\\Users\\Gamer\\anaconda3\\bin omptarget.rtl.level0.dll C:\\Users\\Gamer\\anaconda3\\bin\\omptarget.rtl.level0.dll .dll\r\n\r\nC:\\Users\\Gamer\\anaconda3\\bin omptarget.rtl.opencl.dll C:\\Users\\Gamer\\anaconda3\\bin\\omptarget.rtl.opencl.dll .dll\r\n\r\nC:\\yolovtest devi.txt C:\\yolovtest\\devi.txt .txt\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_09-.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_09-.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_17-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_17-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_39-.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_39-.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_46-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_46-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_54-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_54-Window.png .png\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfrom list_all_files_recursively import get_folder_file_complete_path\r\n\r\nfi = get_folder_file_complete_path(folders=[r\"C:\\yolovtest\"])\r\n\r\nfor file in fi[:10]:\r\n\r\n    print(file.folder, file.file, file.path, file.ext)\r\n\r\n\t\r\n\r\n\t\r\n\r\nC:\\yolovtest devi.txt C:\\yolovtest\\devi.txt .txt\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_09-.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_09-.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_17-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_17-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_39-.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_39-.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_46-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_46-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_13_54-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_13_54-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 13_14_25-Window.png C:\\yolovtest\\backgroundimages\\2022-10-14 13_14_25-Window.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 21_29_08-Greenshot.png C:\\yolovtest\\backgroundimages\\2022-10-14 21_29_08-Greenshot.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 21_29_21-Greenshot.png C:\\yolovtest\\backgroundimages\\2022-10-14 21_29_21-Greenshot.png .png\r\n\r\nC:\\yolovtest\\backgroundimages 2022-10-14 21_29_25-Greenshot.png C:\\yolovtest\\backgroundimages\\2022-10-14 21_29_25-Greenshot.png .png\r\n\r\n\r\n\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "List files recursively",
    "version": "0.12",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/list_all_files_recursively"
    },
    "split_keywords": [
        "search",
        "files",
        "recursively"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d56d1f402c7a0f2fb71154cb8318c113aa23645dd4cdf0e939b2cea3e3b615d",
                "md5": "57dc7f3439f31f807c176c61440af30f",
                "sha256": "8ed13b06c109194421505e6e9f818162a93c26c9b47d2af0cb6e92b970f5d5bd"
            },
            "downloads": -1,
            "filename": "list_all_files_recursively-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57dc7f3439f31f807c176c61440af30f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6731,
            "upload_time": "2023-04-06T01:56:13",
            "upload_time_iso_8601": "2023-04-06T01:56:13.534037Z",
            "url": "https://files.pythonhosted.org/packages/6d/56/d1f402c7a0f2fb71154cb8318c113aa23645dd4cdf0e939b2cea3e3b615d/list_all_files_recursively-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e608a7984d470a262f2d2f4d99f353156ef7459e593d056a8aad48679b28530",
                "md5": "1473c2f059b1d0994871ab6323b5a2e8",
                "sha256": "0569a8fb724c84cfd5e96af64e5968297ebfd0cb318a3f64bc7ac667cec53130"
            },
            "downloads": -1,
            "filename": "list_all_files_recursively-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "1473c2f059b1d0994871ab6323b5a2e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4706,
            "upload_time": "2023-04-06T01:56:15",
            "upload_time_iso_8601": "2023-04-06T01:56:15.360067Z",
            "url": "https://files.pythonhosted.org/packages/2e/60/8a7984d470a262f2d2f4d99f353156ef7459e593d056a8aad48679b28530/list_all_files_recursively-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-06 01:56:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "list_all_files_recursively",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "list-all-files-recursively"
}
        
Elapsed time: 0.60173s