Skip to content

This is a simple Python script that allows you to convert Windows file paths to their corresponding Linux format. It replaces backslashes with forward slashes and converts drive letters to the appropriate Linux format.

Notifications You must be signed in to change notification settings

consis-tency/WinLin-Path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Windows to Linux Path Converter

This is a simple Python script that allows you to convert Windows file paths to their corresponding Linux format. It replaces backslashes with forward slashes and converts drive letters to the appropriate Linux format.

Prerequisites

Before using this converter, you need to have Python installed on your system. You can download Python from the official website: https://www.python.org/downloads/

Installation

  1. Clone this repository or download the script directly.
git clone https://github.com/consis-tency/WinLin-Path.git
  1. Install the required pyperclip library using pip:
pip install pyperclip

Usage

  1. Open a terminal or command prompt.

  2. Navigate to the directory where you have downloaded or cloned the repository.

  3. Run the script by executing the following command:

python WinLin.py
  1. You will be prompted to enter a Windows path.

  2. After entering the path, press Enter, and the script will convert the path to its corresponding Linux format and copy it to your clipboard.

  3. You can now paste the converted Linux path wherever you need it.

Example

Let's say you have a Windows path:

C:\Users\YourUsername\Documents\file.txt

After running the script and providing this path as input, it will convert to the following Linux path:

/mnt/c/Users/YourUsername/Documents/file.txt

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Contributions are welcome!

About

This is a simple Python script that allows you to convert Windows file paths to their corresponding Linux format. It replaces backslashes with forward slashes and converts drive letters to the appropriate Linux format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages