Skip to main content

List files recursively, limit the depth of the subdirs, and get the creation and modification times

Project description

List files recursively, limit the depth of the subdirs, and get the creation and modification times

# Tested on windows 
$pip install list-files-with-timestats
from list_files_with_timestats import get_folder_file_complete_path,get_folder_file_complete_path_limit_subdirs
folders = [r"C:\Program Files\NVIDIA Corporation"]
allfi = get_folder_file_complete_path_limit_subdirs(
    folders, maxsubdirs=1, withdate=True
) # calling this function, you can limit the depth of the subdirs, and get the creation and modification times
for a in allfi:
    print(a)


# Listing the files with all subdirs 
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)
    

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

list_files_with_timestats-0.11.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

list_files_with_timestats-0.11-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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