Skip to main content

Displays the path to the user's documents directory.

Project description

mydocuments

A command line tool that returns the path to the user's Documents directory.

Description

Conventional knowledge says that in Windows, user's default Documents directory is located in %USERPROFILE%\Documents. This is wrong.

The Documents directory can exist in:

    %USERPROFILE%\Documents
    %USERPROFILE%\OneDrive\Documents
    %USERPROFILE%\OneDrive - [Company Name]\Documents

In fact, a folder named Documents can exist in all of the above locations simultaneously.

There is no environmental variable that tells you which one is the correct one.

There is no environment variable that tells you whether OneDrive backup is enabled or not, or if it is, if it's personal OneDrive or OneDrive for Business.

This tool was written to eliminate the guess-work and provide a definite answer by making a Windows API call to retrieve the correct path.

For platform agnosticism sake, it also provides a fuzzy find method that attempts to guess the correct path.

Usage

    mydocuments [-f | -w | -h | -v]

      --help, -h    Show this help message and exit.
      --version, -v Show version information and exit.
      --fuzzy, -f   Use a fuzzy multiplatform method.
      --winapi, -w  Use Windows API method.

By default, if run on Windows the tool will use the more accurate -w method. On other platforms it will default to the fuzzy finder, for obvious reasons.

Installation

Windows

On Windows, this tool is distributed via scoop (see scoop.sh).

First, you need to add my bucket:

scoop bucket add maciak https://github.com/maciakl/bucket
scoop update

Next simply run:

scoop install mydocuments

If you don't want to use scoop you can simply download the executable from the release page and extract it somewhere in your path.

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

mydocuments-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mydocuments-0.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file mydocuments-0.1.1.tar.gz.

File metadata

  • Download URL: mydocuments-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for mydocuments-0.1.1.tar.gz
Algorithm Hash digest
SHA256 55d62cbb7a8f391a6c1cf6ab717d9cbbded42afbd3bf63a3d2843ceeb4e85e8f
MD5 4057ab90efe770901f92b64828dd9c9c
BLAKE2b-256 cdde504074fc832e1d1cbe0a1928abc13942498abbd6439c3a46256c69f50f43

See more details on using hashes here.

File details

Details for the file mydocuments-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mydocuments-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7bac65934c2dbcb5238f3c86a36f3fc321ce940785531132c7f8c758264c1070
MD5 d9bccfc9b91a4fc020e7d6bea1e1d0f9
BLAKE2b-256 3bfcecc3afc8f3a0e7423ba86abe9da3a4489ff9cb17dc2505de68e180f486c5

See more details on using hashes here.

Supported by

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