Skip to main content

We can use the GetFileAccess module to find out where the files are located in memory and return a file path for a given filename. We will also return a count of the given filename in memory.

Project description

Access With Name is a file access module to find out where the files are located in memory and return a file path for a given filename. We will also return a count of the given filename in memory.

pip install getfilepath

Source code available at https://github.com/SriBalaji2112/GetFilePath/documentation

https://github.com/SriBalaji2112/GetFilePath

If you need help installing Python, visit https://installpython3.com/

.. Access With Name documentation master file, created by Balaji on Tuesday Dec 20 10.00.00 2022. You can adapt this file completely to your liking, but it should at least contain the root GetFilePath directive.

Welcome to getfilepath's documentation!

We can use the fileaccess module to find out where the files are located in memory and return a file path for a given filename. We will also return a count of the given filename in memory.

This function will count how many given external files are in your memory and return it. You must enter a drive name, which drive you want to search. The API is designed to be simple. GetFilePath works on Windows, macOS, and Linux, and runs on Python 2 and 3.

To install with pip, run pip install GetFilePath. See the :doc:install page for more details.

The source code is available on: https://github.com/SriBalaji2112/GetFilePath

GetFilePath has several features:

  • It will return the file path for the given filename and file type.
  • ExtensionsCounter counts the number of files in a specific extension.
  • This service will return the full file path of a given file name.
  • This function will count how many given external files are in your memory and return it.

Examples

.. code :: python

Example Testing Program and function definition

>>> import GetFilePath

>>> # You will have to input the name of a connected drive you want to search, or else it will take the default drive —> “C:\\“.
>>> GetFilePath.driveName = "D://"

>>> # We can use the fileaccess module to find out where the files are located in memory and return a file path for a given filename.
>>> print(GetFilePath.returnFilepath("balaji"))

>>> # This will return a count of parameter names with extensions.
>>> print(GetFilePath.extensionCounter("balaji", ".png"))

>>> # We will also return the number of the given filename in memory.
>>> print(GetFilePath.fileNameCounter("balaji"))

>>> # The file name in the given parameter extension is returned.
>>> print(GetFilePath.nameWithExtension("balaji", ".png"))

>>> # This function will open a file with only passing its name.
>>> print(GetFilePath.openFileWithName("balaji"))

Output of the testing program

.. code :: python

>>>  ['D://Attedance project 2.0/balaji2.png', 'D://Attedance project 2.0/images/BALAJI S.jpg', 'D://Attedance project 2.0/img/balaji.png', 'D://Attedance project 2.0/img/balaji3.png', 'D://College/Updated/BALAJI B.jpg', 'D://image compare/balaji2.png', 'D://image compare/img/balaji - Copy (2).png', 'D://image compare/img/balaji - Copy (3).png', 'D://image compare/img/balaji - Copy (4).png', 'D://image compare/img/balaji - Copy (5).png', 'D://image compare/img/balaji - Copy (6).png', 'D://image compare/img/balaji - Copy (7).png', 'D://image compare/img/balaji - Copy.png', 'D://image compare/img/balaji.png', 'D://image compare/img/balaji3.png', 'D://pycham/Attedance project 2.0/images/BALAJI S.jpg', 'D://pycham/attedence project/images/BALAJI S.jpg']
>>>  13
>>>  17
     ['D://Attedance project 2.0/balaji2.png', 'D://Attedance project 2.0/img/balaji.png', 'D://Attedance project 2.0/img/balaji3.png', 'D://image compare/balaji2.png', 'D://image compare/img/balaji - Copy (2).png', 'D://image compare/img/balaji - Copy (3).png', 'D://image compare/img/balaji - Copy (4).png', 'D://image compare/img/balaji - Copy (5).png', 'D://image compare/img/balaji - Copy (6).png', 'D://image compare/img/balaji - Copy (7).png', 'D://image compare/img/balaji - Copy.png', 'D://image compare/img/balaji.png', 'D://image compare/img/balaji3.png']
     1  -- balaji2.png
     2  -- BALAJI S.jpg
     3  -- balaji.png
     4  -- balaji3.png
     5  -- BALAJI B.jpg
     6  -- balaji2.png
     7  -- balaji - Copy (2).png
     8  -- balaji - Copy (3).png
     9  -- balaji - Copy (4).png
     10  -- balaji - Copy (5).png
     11  -- balaji - Copy (6).png
     12  -- balaji - Copy (7).png
     13  -- balaji - Copy.png
     14  -- balaji.png
     15  -- balaji3.png
     16  -- BALAJI S.jpg
     17  -- BALAJI S.jpg
     They are  17 files in this name, choose your file: 
     Say a exact file.
     Enter a file name: 2
     Opening a File  D://Attedance project 2.0/images/BALAJI S.jpg
     File Open successfully.

The benefit of using GetFilePath, Easily access a file with only file name.

FAQ: Frequently Asked Questions

Send questions to https://github.com/SriBalaji2112

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

getfilepath-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

getfilepath-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file getfilepath-0.0.1.tar.gz.

File metadata

  • Download URL: getfilepath-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for getfilepath-0.0.1.tar.gz
Algorithm Hash digest
SHA256 245cb657bb6e398e50141ef630bfb30052cb4db910aeca72af501d5527641439
MD5 61e330faf8651642c2fee7c5d4b486db
BLAKE2b-256 1058502e2d8989ef89466deb80e06a86fb4fd9fb2aa1a25a28ade5cc7579f41f

See more details on using hashes here.

File details

Details for the file getfilepath-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: getfilepath-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for getfilepath-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ca180616aaeab1d2481a759a4f0bae23e44cb936d9a337c7e57bec661b47445
MD5 09eb980d8118b5af18bdab1de0af85eb
BLAKE2b-256 97a1639530f3053285a97b416a2a9a0f4e8b3e44428f5644b0432c64cb8ccc8f

See more details on using hashes here.

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