C:\PROJECTS\xyz2009>cd c:/projects
The system cannot find the path specified.
C:\PROJECTS\xyz009>cd c:\projects
C:\PROJECTS>
Another Update:
Revising my post in response to ikegami's post.
Apologize for being too cryptic.
1. First there are a whole lot of Windows things between Win 3.1
and Win XP: Win 98, WinNT, Win2K. I was thinking more about NT and
2K when I made the comment about previous versions of windows.
At one time I had all 4 versions (98,NT,2K,XP) on my network
for testing, but am down to just XP now. There are lots of quirks
between these various versions.
2. I did some testing at the command prompt on XP and found:
C:\>
C:\>cd projects/replyto
C:\PROJECTS\replyto>
That was a "WOW" moment as I hadn't expected that forward slash
to work with the cd command! But it did!
3. Then I found out that there is something special about the Drive:
root- the forward slash doesn't work in this situation:
C:\PROJECTS\replyto>cd c:/projects
The system cannot find the path specified. (didn't work)
C:\PROJECTS\replyto>cd c:\projects (does work)
C:\PROJECTS>
That little discovery is what prompted the update: "not quite right" comment.
4. More examples:
C:\PROJECTS>type testing/test.pl (doesn't work)
The syntax of the command is incorrect.
C:\PROJECTS>type "testing/test.pl" (doesn't work either)
The system cannot find the file specified.
C:\PROJECTS>type "testing\test.pl" (works)
C:\PROJECTS>type testing\test.pl (works)
C:\PROJECTS>cd ./testing (works)
C:\PROJECTS\testing>
C:\PROJECTS>cd /testing (works)
C:\PROJECTS\testing>
Evidently sometimes the "forwards slash" works at the command line and sometimes it
doesn't. There appears to be something special about drive root and I suppose some
of these commands like "type" can get confused between path and "/" options.
5. In an attempt to try and avoid confusion, when writing Perl, I always use
forward slash. That works with all Perl functions even with a path like
c:/projects. As long as you don't go the the shell with say a command('blah'),
forward slash is the way to go. |