Searching \ for '[EE] Slashes and backslashes in URLs' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=slashes+backslashes
Search entire site for: 'Slashes and backslashes in URLs'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Slashes and backslashes in URLs'
2008\05\29@153101 by Dr Skip

picon face
I really haven't followed this thread, but I should comment here on this. I've
looked into this because of having to teach newbies, and to make a long, boring
topic short, I've found that it's from 'Microsoft'. ;)

Until DOS and the PC, the backslash wasn't in many people's usage. THEN, with
the PC, you had to use it or fail and people would make sure they used the
backslash when using the PC. Even when another newbie said 'slash' a sophomore
newbie would assume backslash. Being beaten with error messages helped. So
everyone of that lineage has typed backslash orders of magnitude more than they
ever typed a slash.

So, there are a lot of people trained to translate backslash at any sort of
slash. In this case, journalists have often had to use custom systems built on
older platforms, many times text (and DOS) based, so they would have lots of
experience with backslashes.

It's just their 'programming' kicking in.


Lucas Thompson wrote:
> Maybe that explains why half the time when I hear someone on the
> television or radio read aloud a URL they say "backslash" when they
> mean to say "slash". :)

2008\05\29@175037 by Jinx

face picon face
> So, there are a lot of people trained to translate backslash as any
> sort of slash

http://en.wikipedia.org/wiki/Backslash

Would there be a case then for introducing computer punctuation
as well as traditional punctuation in schools ? Everyone knows
the basic . , ;:  etc, a few more wouldn't be much of a hardship



2008\05\29@182812 by Dr Skip

picon face
Not a bad idea...

But W'pedia has it wrong, at least for any DOS/Win system I've used in the last
25 yrs ;) ...

> In DOS and Microsoft Windows, either the backslash or slash can be used as the delimiter between directories and filenames in path expressions.



Jinx wrote:
>
> http://en.wikipedia.org/wiki/Backslash
>
> Would there be a case then for introducing computer punctuation
> as well as traditional punctuation in schools ? Everyone knows
> the basic . , ;:  etc, a few more wouldn't be much of a hardship
>
>
>

2008\05\29@191239 by Jinx

face picon face
> But W'pedia has it wrong, at least for any DOS/Win system I've
> used in the last 25 yrs ;) ...
>
> In DOS and Microsoft Windows, either the backslash or slash
> can be used as the delimiter between directories and filenames in
> path expressions.

I think they meant that both can be *found* in expressions but
they aren't inter-changeable

2008\05\29@191651 by Apptech

face
flavicon
face
>> In DOS and Microsoft Windows, either the backslash or
>> slash can be used as the delimiter between directories
>> and filenames in path expressions.

Fails in the WIN XP home I just tried it on, either at start
or in middle.

   DIR   /ZZZ                x
   DIR    \ZZZ/YYY     x

Where yyy is either a subdirectory or a file name


       R

2008\05\29@201319 by Timothy J. Weber

face picon face
Apptech wrote:
>>> In DOS and Microsoft Windows, either the backslash or
>>> slash can be used as the delimiter between directories
>>> and filenames in path expressions.
>
> Fails in the WIN XP home I just tried it on, either at start
> or in middle.
>
>     DIR   /ZZZ                x
>     DIR    \ZZZ/YYY     x
>
> Where yyy is either a subdirectory or a file name

It doesn't work with the 'dir' command, because that program scans for
arguments first, and gets confused when it finds the "argument
introduction" character with no valid argument after it.

But Windows *does* do the translation in the file APIs, so if you type:

       dir "c:/zzz"

it'll work just the same as with a backslash.

But DOS never did this, in my recollection.  I'm going to change the
Wikipedia article.
--
Timothy J. Weber
http://timothyweber.org

2008\05\29@222245 by Dr Skip

picon face
In Win XP Pro, SP2, all updates but SP3, in the CMD interpreter (the native NT
shell provided) it does not work here.

ie:
D:\windows>dir c:/temp
Parameter format not correct - "emp".

BUT, enclosing the destination in "" does make it work, as in:
dir "c:/temp"

Not sure if all parameters would need to be in the quotes or what if one had
some to use with a particular command.


Timothy J. Weber wrote:
{Quote hidden}

2008\05\30@022831 by William \Chops\ Westfield

face picon face

On May 29, 2008, at 5:12 PM, Timothy J. Weber wrote:
> It doesn't work with the 'dir' command, because that program scans for
> arguments first, and gets confused when it finds the "argument
> introduction" character with no valid argument after it.
>
> But Windows *does* do the translation in the file APIs, so if you  
> type:
>
>        dir "c:/zzz"
>
> it'll work just the same as with a backslash.
>
> But DOS never did this, in my recollection.

I recall there being a switch you could set when running command.com  
in DOS that would allow "/" as a directory separator, back as far as  
DOS *had* directories.  Later, it became the default.

As you say, it works in windows for those cases where it's not  
ambiguous with its use as a switch/option delimiter.

(IIRC, CP/M, and later DOS, all derived some of the basic command  
line syntax from the early DEC operating systems like RT/11, RSX, and  
TOPS-10 (Harvard had a TOPS-10 mainframe.)  We should all be  
moderately glad that the later MSDOS versions didn't copy directory  
syntax from one of those!  (It might have looked like myfile.mac
[4000,42,src], where 4000 was sorta like a group, 42 was an  
individual, and src was a subdirectory...)

BillW

2008\05\30@083018 by Robert Ammerman

picon face
In XP Pro:

dir "c:/temp" -- works
cd "c:/temp" -- does not work

-- Bob Ammerman
RAm Systems

2008\05\30@123826 by Gerhard Fiedler

picon face
Robert Ammerman wrote:

> In XP Pro:

FWIW, that's probably "In cmd.exe in XP Pro".  While cmd.exe is the default
shell, there are a few others (not that different from Linux :)

> dir "c:/temp" -- works
> cd "c:/temp" -- does not work

In my cmd.exe (v5.1.2600), I get these results:

dir c:/temp - doesn't work
dir "c:/temp" - works
cd c:/temp - works
cd "c:/temp" - works

I assume that's because dir has switches (separated with '/'), while cd
doesn't have any. When invoked without the quotes, "/temp" is seen as an
invalid switch ("Parameter format not correct").

Gerhard

2008\05\30@131602 by Timothy Weber

face picon face
Gerhard Fiedler wrote:
> In my cmd.exe (v5.1.2600), I get these results:
>
> dir c:/temp - doesn't work
> dir "c:/temp" - works
> cd c:/temp - works
> cd "c:/temp" - works
>
> I assume that's because dir has switches (separated with '/'), while cd
> doesn't have any. When invoked without the quotes, "/temp" is seen as an
> invalid switch ("Parameter format not correct").

And under the covers, once the string gets past whatever processing the
shell or utility program is doing on it and gets to the Windows file
APIs, if there are still slashes in it, they're changed to backslashes.

To me, that (the API behavior) is the gist of the statement "the OS
supports it", and I think that was never the case with DOS - I'm
guessing the switch William is remembering was in the command
interpreter, not in the DOS file APIs.
--
Timothy J. Weber
http://timothyweber.org


'[EE] Slashes and backslashes in URLs'
2008\06\02@114123 by Michael Rigby-Jones
picon face


> -----Original Message-----
> From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu] On
Behalf
{Quote hidden}

cd
> doesn't have any. When invoked without the quotes, "/temp" is seen as
an
> invalid switch ("Parameter format not correct").
>
> Gerhard

Not the cd command only works if you start above your target directory
(root in this case). I get the following which appears to show that a
leading forward slash on a path is ignored, i.e. you can't start from
root using this method.

   C:\>cd "/dell"

   C:\dell>

This appears to work ok, but if I move into a different directory it
breaks:

   C:\>cd windows

   C:\WINDOWS>cd "/dell"
   The system cannot find the path specified.


Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2008\06\02@121516 by Eoin Ross

flavicon
face
The reason that it didn't work is that it was looking in "C:/Windows/" for a folder named "Dell"

Given that - you're in    C:\Windows\
                   and          C:\Dell\              exists

You'd need to type:

CD ../Dell  
or
CD \Dell

If in :                         C:\windows\temp\
you'd need to type    cd ../../dell
or                              cd \dell

".."   refers to the parent directory of the one you are in.
"\"   by itself with CD refers to the root of the current drive.

Win98 COMMAND.COM works the same way - except it won't handle the forward slash. ("/")  and you'll have to use backslash "\"
I believe this is the same as DOS 6.22.

>>> .....Michael.Rigby-JonesKILLspamspam.....bookham.com 02 Jun 08 11:37:06 >>>


> {Original Message removed}

2008\06\02@124053 by Michael Rigby-Jones

picon face


> -----Original Message-----
> From: EraseMEpiclist-bouncesspam_OUTspamTakeThisOuTmit.edu [piclist-bouncesspamspam_OUTmit.edu] On
Behalf
> Of Eoin Ross
> Sent: 02 June 2008 17:15
> To: @spam@piclistKILLspamspammit.edu
> Subject: RE: [EE] Slashes and backslashes in URLs
>
> The reason that it didn't work is that it was looking in "C:/Windows/"
for
{Quote hidden}

forward
> slash. ("/")  and you'll have to use backslash "\"
> I believe this is the same as DOS 6.22.


Yes, I am very familiar with DOS path structures, but...

The argument was that forward slashes get converted to back slashes, so
they are equivalent.  This is clearly not the case for the leading
forward slash.

i.e.

   cd "\dell" != cd "/dell"


In fact AFAICT:

   cd "/dell" == cd "dell"

i.e. a leading forward slash is simply ignored.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2008\06\03@074725 by Gerhard Fiedler

picon face
Michael Rigby-Jones wrote:

> The argument was that forward slashes get converted to back slashes, so
> they are equivalent.  

Well, more specifically, the original argument was that this is so in the
Windows API, which AFAIK is correct. The discussion here was all about
cmd.exe, which is a different story.

> This is clearly not the case for the leading forward slash.

AFAICT all the inconsistent behavior around forward slashes that we've been
discussing here is introduced by cmd.exe, not by the Windows API.

For example, in 4nt.exe (another Windows command processor), I can use "cd
/dell" from inside c:\windows and it works as intended.

(However, "dir /dell" still doesn't work from inside c:\windows, because it
also follows the general Windows convention and uses the forward slash as a
parameter separator, therefore looking at "/dell" as arguments to "dir",
not as a path specification.)

Gerhard

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...