Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Network path

From: james:mustard at: 21-Apr-2002 16:51

Alessandro Manotti wrote
> mhm... I think you are right. Infact, in windows, CD command cannot change > dir directly from a drive to another one (but change directly in "hide" > mode...):
short answer - windows CAN change directly but you need to use the /d parameter as in: cd /d drive:\path
> as you can see, to change a drive, in windows I must type the drive letter > (without CD command) but CD command functioned! Infact, after I run CD > command I don't see anything, but if I type drive letter, I discover that
my
> current directory is the directory given to CD command! > > Sometimes DOS & Windows are very funny....
If you type cd /? you will see why Windows behaves like this - Windows has the ability to hold a current directory for each drive. In the pre-GUI world this was often seen as advantageous for quickly switching file locations and doing various file ops with the drive: parameter. Of course no one uses the commandline in Windows any more ... do they? :-) /--------------------------------------------------------------------------- -- C:\>cd /? Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..] .. Specifies that you want to change to the parent directory. Type CD drive: to display the current directory in the specified drive. Type CD without parameters to display the current drive and directory. Use the /D switch to change current drive in addition to changing current directory for a drive. If Command Extensions are enabled CHDIR changes as follows: The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk. CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory name that contains a space without surrounding the name with quotes. For example: cd \winnt\profiles\username\programs\start menu is the same as: cd "\winnt\profiles\username\programs\start menu" which is what you would have to type if extensions were disabled. /----------------------------------------------------------------------- James.