C:WProgram Files
有谁知道这样的位置?如何在程序中处理,与\
相同?
答案 0 :(得分:2)
相对于该驱动器号的当前目录,解析具有驱动器号然后相对路径的路径。
Windows和MS-DOS系统分别跟踪每个驱动器号的当前目录。
例如:
G:\>dir c:
Volume in drive C is System
Volume Serial Number is A09A-AD9C
Directory of C:\
06/12/2008 02:44 PM 0 AUTOEXEC.BAT
06/12/2008 02:44 PM 0 CONFIG.SYS
08/25/2008 02:22 PM <DIR> Documents and Settings
12/09/2009 12:45 PM <DIR> Program Files
[snip]
G:\>cd "c:\Program Files"
G:\>dir c:
Volume in drive C is System
Volume Serial Number is A09A-AD9C
Directory of C:\Program Files
12/09/2009 12:45 PM <DIR> .
12/09/2009 12:45 PM <DIR> ..
05/14/2010 11:38 AM <DIR> 7-Zip
12/13/2010 01:49 AM <DIR> Adobe
[snip]
G:\>dir c:Adobe
Volume in drive C is System
Volume Serial Number is A09A-AD9C
Directory of C:\Program Files\Adobe
12/13/2010 01:49 AM <DIR> .
12/13/2010 01:49 AM <DIR> ..
01/25/2010 01:45 AM <DIR> Reader 8.0
12/13/2010 01:49 AM <DIR> Reader 9.0
路径c:Adobe
与C:\Program Files\Adobe
相同,因为这是C驱动器的当前目录,即使当前驱动器实际上是G驱动器。