PDA

View Full Version : C: or C:\


Skybuck Flying
June 23rd 04, 11:06 AM
Hi,

Is C: a valid path ?

I know

C:\ is a valid path... that's the root.

Where can I find information about if C: is valid or not...

I would like to see some microsoft documentation or so that says

C: is not a valid path... something like that...

Since if I am not mistaking some tools allowed it to be used... like

copy a: c:

I am not sure if that would work... I think it does work.

Yup... it tries to copy to current directory.

Bye,
Skybuck.

David Candy
June 23rd 04, 11:18 AM
C: is different to C:\. C:\ is a path C: isn't, it's a drive =
specification. C: refers to whatever the current default directory is =
for that drive (except for drive utilities of course). There is a =
current drive and all drives have a current directory. Your current =
directory is the default directory on the default drive.

Type cmd

Type
cd c:\windows

Type=20
d: (means change drive in this context - this is a command rather =
than a drive specification meaning change default drive to the specified =
drive - pretty dumb but we're all used to it)

Type=20
dir c:

and you'll get a listing of windows.
--=20
----------------------------------------------------------
http://www.counterpunch.org/bageant06132004.html
"Skybuck Flying" > wrote in message =
...
> Hi,
>=20
> Is C: a valid path ?
>=20
> I know
>=20
> C:\ is a valid path... that's the root.
>=20
> Where can I find information about if C: is valid or not...
>=20
> I would like to see some microsoft documentation or so that says
>=20
> C: is not a valid path... something like that...
>=20
> Since if I am not mistaking some tools allowed it to be used... like
>=20
> copy a: c:
>=20
> I am not sure if that would work... I think it does work.
>=20
> Yup... it tries to copy to current directory.
>=20
> Bye,
> Skybuck.
>=20
>

Skybuck Flying
June 23rd 04, 08:52 PM
Somebody else said this only applies to the command prompt.

Is that true.... ? or does it apply to the rest of windows as well ?

He said every process has only one current folder.

The command prompt/shell adds it's own notition of multiple current
directories per drive......

Bye,
Skybuck.

"David Candy" > wrote in message
...
C: is different to C:\. C:\ is a path C: isn't, it's a drive specification.
C: refers to whatever the current default directory is for that drive
(except for drive utilities of course). There is a current drive and all
drives have a current directory. Your current directory is the default
directory on the default drive.

Type cmd

Type
cd c:\windows

Type
d: (means change drive in this context - this is a command rather
than a drive specification meaning change default drive to the specified
drive - pretty dumb but we're all used to it)

Type
dir c:

and you'll get a listing of windows.
--
----------------------------------------------------------
http://www.counterpunch.org/bageant06132004.html
"Skybuck Flying" > wrote in message
...
> Hi,
>
> Is C: a valid path ?
>
> I know
>
> C:\ is a valid path... that's the root.
>
> Where can I find information about if C: is valid or not...
>
> I would like to see some microsoft documentation or so that says
>
> C: is not a valid path... something like that...
>
> Since if I am not mistaking some tools allowed it to be used... like
>
> copy a: c:
>
> I am not sure if that would work... I think it does work.
>
> Yup... it tries to copy to current directory.
>
> Bye,
> Skybuck.
>
>

David Candy
June 24th 04, 03:32 AM
I don't think so as programming languages allow one to get the current =
directory for any drive (and the current drive if not specified).

CurDir Function
=20

Returns a Variant (String) representing the current path.

Syntax

CurDir[(drive)]

The optional drive argument is a string expression that specifies an =
existing drive. If no drive is specified or if drive is a zero-length =
string (""), CurDir returns the path for the current drive. On the =
Macintosh, CurDir ignores any drive specified and simply returns the =
path for the current drive.


--=20
----------------------------------------------------------
http://www.counterpunch.org/bageant06132004.html
"Skybuck Flying" > wrote in message =
...
> Somebody else said this only applies to the command prompt.
>=20
> Is that true.... ? or does it apply to the rest of windows as well ?
>=20
> He said every process has only one current folder.
>=20
> The command prompt/shell adds it's own notition of multiple current
> directories per drive......
>=20
> Bye,
> Skybuck.
>=20
> "David Candy" > wrote in message
> ...
> C: is different to C:\. C:\ is a path C: isn't, it's a drive =
specification.
> C: refers to whatever the current default directory is for that drive
> (except for drive utilities of course). There is a current drive and =
all
> drives have a current directory. Your current directory is the default
> directory on the default drive.
>=20
> Type cmd
>=20
> Type
> cd c:\windows
>=20
> Type
> d: (means change drive in this context - this is a command =
rather
> than a drive specification meaning change default drive to the =
specified
> drive - pretty dumb but we're all used to it)
>=20
> Type
> dir c:
>=20
> and you'll get a listing of windows.
> --=20
> ----------------------------------------------------------
> http://www.counterpunch.org/bageant06132004.html
> "Skybuck Flying" > wrote in message
> ...
> > Hi,
> >
> > Is C: a valid path ?
> >
> > I know
> >
> > C:\ is a valid path... that's the root.
> >
> > Where can I find information about if C: is valid or not...
> >
> > I would like to see some microsoft documentation or so that says
> >
> > C: is not a valid path... something like that...
> >
> > Since if I am not mistaking some tools allowed it to be used... like
> >
> > copy a: c:
> >
> > I am not sure if that would work... I think it does work.
> >
> > Yup... it tries to copy to current directory.
> >
> > Bye,
> > Skybuck.
> >
> >
>=20
>

Jussi Jumppanen
March 16th 05, 03:22 PM
Skybuck Flying wrote:

> Somebody else said this only applies to the command prompt.

The command prompt is nothing more than a Win32 console application.

> Is that true.... ? or does it apply to the rest of windows as well ?

As far as Windows is concerned all windows applications are the
same.

> He said every process has only one current folder.

This is correct.

For example if you write a program to change to a particular
directory then exit, if you run this program from the command
prompt in any other directory the program will change to the
new directory then exit, but this has no effect on the current
directory of the command prompt.

> The command prompt/shell adds it's own notition of multiple
> current directories per drive......

The program has a current drive and each drive has a
current directory.

The program can change the drive using setdisk function
and change the current directory of the current drive
using chdir.

All the command prompt does is map user friendly commands
to these same low level functions.

Jussi Jumppanen
Author of: Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor
"The C/C++, Java, HTML, FTP, Python, PHP, Perl programmer's editor"
http://www.zeusedit.com

Jussi Jumppanen
March 16th 05, 03:22 PM
Skybuck Flying wrote:

> Somebody else said this only applies to the command prompt.

The command prompt is nothing more than a Win32 console application.

> Is that true.... ? or does it apply to the rest of windows as well ?

As far as Windows is concerned all windows applications are the
same.

> He said every process has only one current folder.

This is correct.

For example if you write a program to change to a particular
directory then exit, if you run this program from the command
prompt in any other directory the program will change to the
new directory then exit, but this has no effect on the current
directory of the command prompt.

> The command prompt/shell adds it's own notition of multiple
> current directories per drive......

The program has a current drive and each drive has a
current directory.

The program can change the drive using setdisk function
and change the current directory of the current drive
using chdir.

All the command prompt does is map user friendly commands
to these same low level functions.

Jussi Jumppanen
Author of: Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor
"The C/C++, Java, HTML, FTP, Python, PHP, Perl programmer's editor"
http://www.zeusedit.com