Skip to content

Takes whatever is in your clipboard, tries to figure out whether its a Linux or Windows style path, then tries to figure out if the path leads somewhere within the WSL environment or not and finally converts from the current path style (Windows path to Linux style and vise versa) to the other.

License

Notifications You must be signed in to change notification settings

ItsCubeTime/clipbordConvertBetweenWindowsAndWslFilePath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

clipbordConvertBetweenWindowsAndWslFilePath

Takes whatever is in your clipboard, tries to figure out whether its a Linux or Windows style path, then tries to figure out if the path leads somewhere within the WSL environment or not and finally converts from the current path style (Windows path to Linux style and vise versa) to the other - and then puts the result in your clipboard.

Usage:

  1. Set the contents ofwslRootDir.txt to where your WSL is mounted: image
  2. Go into your WSL environtment and copy any file path: image So you have something like: /mnt/c/Program Files/Google/Chrome/ in your clipboard.
  3. Run clipbordConvertBetweenWindowsAndWslFilePath.exe (or python clipbordConvertBetweenWindowsAndWslFilePath.py).
  4. You should now have the Windows equalent path in your clipboard instead, eg: c:/Program Files/Google/Chrome
  5. ???
  6. Profit

I recommend creating a shortcut for the script and placing it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs. That way you can just press the Windows key, type "clipboard Convert" and press enter every time you want to make a conversion.

Example conversions:

  • C:/Program Files/Google/Chrome becomes /mnt/c/Program Files/Google/Chrome
  • /mnt/c/Program Files/Google/Chrome becomes c:/Program Files/Google/Chrome
  • /home/olliver/Desktop/ becomes \\wsl.localhost\Enterprise/home/olliver/Desktop
  • \\wsl.localhost\Enterprise/home/olliver/Desktop becomes /home/olliver/Desktop

About

Takes whatever is in your clipboard, tries to figure out whether its a Linux or Windows style path, then tries to figure out if the path leads somewhere within the WSL environment or not and finally converts from the current path style (Windows path to Linux style and vise versa) to the other.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages