Skip to main content

A package for creating shortcuts

Project description

PyForShort

PyForShort is a Python package designed for creating shortcuts on Windows using PowerShell.

Installation

You can install the package using pip:

pip install PyForShort

Usage

The package provides the function CreateShortcut to create a shortcut at the specified location.

Function: CreateShortcut

from pyforshort import CreateShortcut

# Parameters:
# name: The name of the shortcut.
# path: The directory where the shortcut will be created.
# target: The target file or folder that the shortcut will point to.

CreateShortcut(name="MyShortcut", path="C:/path/to/shortcut/directory", target="C:/path/to/target/file")

Example

from pyforshort import CreateShortcut

# Creating a shortcut named "MyApp" in the "C:/Shortcuts" folder pointing to "C:/Program Files/MyApp/myapp.exe"
CreateShortcut(name="MyApp", path="C:/Shortcuts", target="C:/Program Files/MyApp/myapp.exe")

This will create a shortcut named MyApp.lnk in the C:/Shortcuts folder, which points to C:/Program Files/MyApp/myapp.exe.

Requirements

  • Python 3.6 or higher
  • Windows OS

Error Handling

If the provided path does not exist, a FileNotFoundError will be raised:

FileNotFoundError: Error: The location 'C:/path/to/shortcut/directory' is not valid.

Contributing

Feel free to fork the repository and submit issues or pull requests. Contributions are welcome!

License

This project is licensed under the MIT License.

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

pyforshort-1.0.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.

PyForShort-1.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file pyforshort-1.0.1.tar.gz.

File metadata

  • Download URL: pyforshort-1.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyforshort-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e78d7a67f941eba7fbd2b69ba5adf6451e64deb238c744f4496b576a0322148e
MD5 26e21163f5fb35e5a7bd89d8e422afa0
BLAKE2b-256 a7750f07ce1388f78097cd463f0bb3f8392c420b25ab6f26d844bb7259c369d5

See more details on using hashes here.

File details

Details for the file PyForShort-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: PyForShort-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for PyForShort-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d76e4b81bd62bc4ef1d0b1d08387617af9d5aa12f6e2ef573746ad5221fab8c5
MD5 89cd8b2edc97d52f11b579254c606f72
BLAKE2b-256 2296d5116bd8e07001233bbb47e4b69d689a1edb45605b7a09c651a652e0695a

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