0

Path Path Copy (https://github.com/clechasseur/pathcopycopy ) will copy Unix or WSL paths in Windows to the clipboard.

so if a Windows path looks like this:

"C:\Users\abc\Desktop\portable\coding apps\AutoHotkey_1.1.30.03"

it will copy a Unix path as:

C:/Users/abc/Desktop/portable/coding apps/AutoHotkey_1.1.30.03

and a WSL path as:

/mnt/c/Users/abc/Desktop/portable/coding\ apps/AutoHotkey_1.1.30.03

Notice that it added a backslash \ to escape the space in "coding apps"

However, WSL also accepts spaces in path names if they're enclosed in quotation marks like so:

"/mnt/c/Users/abc/Desktop/portable/coding apps/AutoHotkey_1.1.30.03"

I find this simpler.

I've tried adding a special path encoding scheme for WSL that avoids the backslashes before spaces, and simply encodes the path in quotations. The dialog box steps I used looked like this:

enter image description here

enter image description here

enter image description here

Here, in the last dialog, I

  • checked the checkboxes indicated by the arrows.
  • added \/ in the find box, and
  • added in the replace box.

However, it's not working as I expected.

If anyone has suggestions or help to offer on how I can copy custom WSL paths without escaping spaces, and by enclosing everything in quotations instead, please do.

Alternatively, if anyone has suggestions for alternative methods to quickly get a WSL path in Windows, please share.

Thanks in advance.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.