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.
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/
- Clone this repository or download the script directly.
git clone https://github.com/consis-tency/WinLin-Path.git
- Install the required
pyperclip
library using pip:
pip install pyperclip
-
Open a terminal or command prompt.
-
Navigate to the directory where you have downloaded or cloned the repository.
-
Run the script by executing the following command:
python WinLin.py
-
You will be prompted to enter a Windows path.
-
After entering the path, press Enter, and the script will convert the path to its corresponding Linux format and copy it to your clipboard.
-
You can now paste the converted Linux path wherever you need it.
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
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!