Skip to main content

Convert between Linux and Windows path in WSL

Project description

# WSL path converter

Convert between Linux and Windows path in [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) (Windows Subsystem for Linux).

## Installation

Either install the latest stable version hosted on [PyPI](https://pypi.org/):

pip install wsl-path-converter

Or clone the source repository and install the bleeding-edge version:

git clone https://github.com/lamyj/wsl-path-converter.git cd wsl-path-converter pip install .

If the latter case is run by a regular user, i.e. non-root, the wpc executable will be installed in ~/.local/bin.

## Usage

This converter works with Windows path mounted in WSL, either through /etc/fstab or through the mount command.

The executable is called wpc. To convert a Windows path to its Linux counterpart, run it with the -u option:

wpc -u C:autoexec.bat

This is also valid using [UNC](https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention) paths (e.g. remote shares):

wpc -u \samba.example.comshare

For the converse operation, i.e. convert a Linux path to its Windows counterpart, use the -w option:

wpc -w /mnt/c/autoexec.bat

If a path unambiguously belongs to either Windows or Linux, the conversion option can be skipped; all previous examples can be run without the option:

wpc C:autoexec.bat wpc \samba.example.comshare wpc /mnt/c/autoexec.bat

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

wsl-path-converter-0.3.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distributions

wsl_path_converter-0.3.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

wsl_path_converter-0.3.0-py2-none-any.whl (5.1 kB view details)

Uploaded Python 2

File details

Details for the file wsl-path-converter-0.3.0.tar.gz.

File metadata

  • Download URL: wsl-path-converter-0.3.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl-path-converter-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c13719022cc3a672fc42cbecef9745291ce43277f2b77ab3b6d57def7ea387c7
MD5 ef2b51014f33335fc41e767ca83fc113
BLAKE2b-256 2b54b9f295d9a4b612da5f9482878f234bad1fe973d7d5901f44887fdd4a831e

See more details on using hashes here.

File details

Details for the file wsl_path_converter-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: wsl_path_converter-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl_path_converter-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f3062aab7622463615ce814a3d1c790e00f61f5fd7a20c26bbc4a4d7aeaaabe
MD5 9a915f3360de724e5cb277f090ab842e
BLAKE2b-256 ddb78f288d2f2db4ab884a49fbbe5c9eac5485c7a014616cb6640d7fe97517f6

See more details on using hashes here.

File details

Details for the file wsl_path_converter-0.3.0-py2-none-any.whl.

File metadata

  • Download URL: wsl_path_converter-0.3.0-py2-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for wsl_path_converter-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 d82219d5751086ec10f3b0855b307f201e2b2f676bf2f74d2fb7653c00cf4c4a
MD5 2e0fb440183e2a2a2e7e165271915c5c
BLAKE2b-256 97161ca53606f98c5ab5b427e7b0c2f19e32d84daac20d51973320719b320892

See more details on using hashes here.

Supported by

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