{"id":19989764,"url":"https://github.com/inspiaaa/python-file-library","last_synced_at":"2026-06-09T03:02:20.372Z","repository":{"id":108960327,"uuid":"190983553","full_name":"Inspiaaa/Python-File-Library","owner":"Inspiaaa","description":"Python File Library is a collection of methods and classes to make working with files easier","archived":false,"fork":false,"pushed_at":"2019-06-10T21:34:10.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-01T21:52:26.363Z","etag":null,"topics":["files","filesystem","folders","oop","python3","renaming"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inspiaaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-09T08:45:43.000Z","updated_at":"2022-06-10T19:27:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"51ade462-60ad-4d11-8090-7a3872fd660d","html_url":"https://github.com/Inspiaaa/Python-File-Library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Inspiaaa/Python-File-Library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FPython-File-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FPython-File-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FPython-File-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FPython-File-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inspiaaa","download_url":"https://codeload.github.com/Inspiaaa/Python-File-Library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FPython-File-Library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34089329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["files","filesystem","folders","oop","python3","renaming"],"created_at":"2024-11-13T04:50:03.942Z","updated_at":"2026-06-09T03:02:20.336Z","avatar_url":"https://github.com/Inspiaaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Python 3.7](https://img.shields.io/badge/Python-3.7-blue.svg?style=for-the-badge\u0026logo=python)  \n# FL - Python File Library  \nFL enables many **high level** operations on Files and Folders in an **OOP style**.\nFor example: *Flattening*, *Renaming*, *Recursively Moving* / *Copying* / *Deleting*, ...\n  \n## Getting Started\n\n### Prerequisites\nA working version of **Python 3.7**\n\n---\n### Example\n#### Basic flattening of a folder\nWe create the folder structure:\n```\nexample\n├── a.txt\n├── test\n│   ├── b.txt\n│   ├── temp\n│   │   └── c.txt\n```\n... and want to **flatten** it to:\n```\nexample\n├── a.txt\n├── b.txt\n└── c.txt\n```\nWe can achieve that with the following code:\n```python\nfrom fl import File, Folder, Example  \n  \n# Create the example nested folder structure with some files\nExample.create_simple_nested()  \n  \n# Collapse (Flatten) the folder structure  \nd = Folder(\"./example/\")  \nd.collapse()\n```\n\n---\n### Adding the creation date to each file\nAdding the **creation date** to all files in the folder:\n```\nexample\n├── a.txt\n├── test\n│   ├── a.txt\n│   ├── b.txt\n│   ├── temp\n│   │   ├── a.txt\n│   │   ├── b.txt\n│   │   └── c.txt\n```\nTo do this, we can run following program:\n```python\nfrom fl import File, Folder, Example\n\n# Create the example folder structure: \nExample.create_nested_with_duplicates()\n\n# Add the date\nd = Folder(\"./example/\")\nd.rename_files(\"%B %TCd-%TCb-%TCY%E\")\n```\nThis program uses [special renaming commands](https://github.com/LavaAfterburner/Python-File-Library/wiki/Renaming-Commands) to add special data (e.g. Date). To **visualize** the result in the **console**, the folder class offers a method to print it:\n```python\nd = Folder(\"./example/\")\nd.print_beautified()\n```\nConsole:\n```\nexample\n├── a 10-Jun-2019.txt\n├── test\n│   ├── a 10-Jun-2019.txt\n│   ├── b 10-Jun-2019.txt\n│   ├── temp\n│   │   ├── a 10-Jun-2019.txt\n│   │   ├── b 10-Jun-2019.txt\n│   │   └── c 10-Jun-2019.txt\n```\n\n---\n## Documentation\nGet started with the documentation [here](https://github.com/LavaAfterburner/Python-File-Library/wiki).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspiaaa%2Fpython-file-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finspiaaa%2Fpython-file-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspiaaa%2Fpython-file-library/lists"}