Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail

by afoken (Chancellor)
on Sep 14, 2020 at 12:48 UTC ( [id://11121728]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail
in thread Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail

C:\>cd with a space C:\with a space>

I think this is a very special case in cmd.exe (and maybe also in command.com): cd/chdir needs exactly one parameter since MS DOS 1.0, so if it is passed more than one, cmd.exe silently combines them into a single parameter.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^6: Filename Surrounded by Quotes in a Scalar Variable Causes Open to Fail
by syphilis (Archbishop) on Sep 14, 2020 at 13:38 UTC
    I think this is a very special case in cmd.exe

    Yes, it's true that there are shell commands that do need the quotes (eg copy and move) but set is another command that does not need them.
    Running set PATH=%PATH%;C:\with a space works as intended.

    Anyway, it seems to me that the need for quotes is by no means specific to windows.
    Last night I indicated that cd on Windows doesn't need the quotes, though cd on Linux does.
    Tonight, I've noticed that set on Windows doesn't need the quotes, though export on Linux does.

    It's pretty clearly inaccurate to present the need for double quotes as a Windows thing - though I guess it could be argued that Bill wasn't actually claiming it was windows-specific.

    Cheers,
    Rob.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121728]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found