0

Like a CLI noob does, I often change directories by using the dragging the target folder into a command prompt to get its path.

What's annoying, however, is that the path isn't wrapped in quotes, which are annoying to add manually.

But what is even stranger to me is that sometimes quotes are added to the folder/filepath automatically.

This doesn't seem to happen with any real consistency, but I have had it happen on both my work and home computers.

So, how can I reliably get a filepath to be wrapped in quotes before it's inserted in my prompt?

4
  • 2
    Quotes are added to the folder/filepath automatically only if it's obligatory for CLI, i.e. if it contains spaces and/or other characters with special functionality in the CLI
    – JosefZ
    Commented Nov 20, 2014 at 16:23
  • Ah that would explain it thanks! But even so, would there be any setting I could change to have that text always be wrapped in quotes?
    – RedRiderX
    Commented Nov 21, 2014 at 12:49
  • Have been seeking for with no success. Moreover, I found a little bug in my previous comment: tried drag & drop a file s&b.txt (created and renamed for this purposes only) with gloomy result C:\bat\COCL\s&b.txt: non-wrapped in quotes
    – JosefZ
    Commented Nov 21, 2014 at 16:54
  • it's much faster to shift+right click (or shift+menu, or shift+F10) > open command prompt here instead of cd into that folder. An alternative is Alt+D > cmd > enter
    – phuclv
    Commented Apr 30, 2018 at 13:36

0

You must log in to answer this question.

Browse other questions tagged .