![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-13 07:25 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » [Help] Representation of the relative path of the upper level |
| Printable Version 1,725 / 4 |
| Floor1 123cainiao | Posted 2007-08-31 16:02 |
| 初级用户 Posts 41 Credits 97 | |
|
Representation of the relative path of the upper level:
File directory structure: alk\bfv\cf\123.bat alk\bfv\456.bat Now use 123.bat to start 456.bat How to write the relative path? Writing: start ../456.bat is obviously incorrect Ask how to represent the upper level directory? [ Last edited by 123cainiao on 2007-8-31 at 04:04 PM ] |
|
| Floor2 123cainiao | Posted 2007-08-31 16:13 |
| 初级用户 Posts 41 Credits 97 | |
|
The following was found online, but it doesn't solve my above problem. Maybe the batch processing needs other parameters?How to represent the parent directory../ represents the parent directory of the directory where the source file is located,../../ represents the parent directory of the parent directory where the source file is located, and so on.
Assume the path of info.html is: c:\Inetpub\wwwroot\sites\blabla\info.html Assume the path of index.html is: c:\Inetpub\wwwroot\sites\index.html The code to add a hyperlink to index.html in info.html should be written like this: <a href = "../index.html">index.html</a> Assume the path of info.html is: c:\Inetpub\wwwroot\sites\blabla\info.html Assume the path of index.html is: c:\Inetpub\wwwroot\index.html The code to add a hyperlink to index.html in info.html should be written like this: <a href = "../../index.html">index.html</a> Assume the path of info.html is: c:\Inetpub\wwwroot\sites\blabla\info.html Assume the path of index.html is: c:\Inetpub\wwwroot\sites\wowstory\index.html The code to add a hyperlink to index.html in info.html should be written like this: <a href = "../wowstory/index.html">index.html</a> How to represent the reference to a subdirectory To reference a file in a subdirectory, just write the path of the subdirectory file directly. Assume the path of info.html is: c:\Inetpub\wwwroot\sites\blabla\info.html Assume the path of index.html is: c:\Inetpub\wwwroot\sites\blabla\html\index.html The code to add a hyperlink to index.html in info.html should be written like this: <a href = "html/index.html">index.html</a> Assume the path of info.html is: c:\Inetpub\wwwroot\sites\blabla\info.html Assume the path of index.html is: c:\Inetpub\wwwroot\sites\blabla\html\tutorials\index.html The code to add a hyperlink to index.html in info.html should be written like this: <a href = "html/tutorials/index.html">index.html</a> |
|
| Floor3 tusheng | Posted 2007-09-01 12:47 |
| 中级用户 Posts 104 Credits 213 | |
|
What the person downstairs said is right, I made a mistake again.
The path is a backslash, not a forward slash. [ Last edited by tusheng on 2007-9-1 at 10:29 PM ] |
|
| Floor4 Michael | Posted 2007-09-01 19:58 |
| 钻石会员 Posts 3,041 Credits 10,056 | |
|
The parent directory of 123.bat is bfv, but don't write \ as /
|
|
| Floor5 sunenze | Posted 2007-09-03 14:25 |
| 初级用户 Posts 20 Credits 47 | |
|
From: Baoji IT Technology Network
http://www.sunenze.com/enzebbs/dispbbs.asp?boardID=4&ID=36&page=2 1. Directory Overview and Classification In the DOS operating system, directories are indexes for storing files, facilitating the more convenient search for the required files or commands. Directories can be classified into the following types: Root Directory: For a hard disk, it can have one, two, three, or even more partitions, but each partition has exactly one root directory, namely "\". For example, C:\ and D:\ represent the root directory of drive C and the root directory of drive D respectively. Note: Many subdirectories can be created under the root directory, and we can still create the next - level directory under these subdirectories. The backslash "\" is still used to represent the relationship between subdirectories and the root directory. Current Directory: The so - called current directory is the directory in which we are currently working. We can use the CD command to check the current working directory. 2. Path Overview and Classification Path: A route from a directory to a directory or from a directory to a file. It is classified into the following types: Absolute Path: A route from the root directory to a file. For example: d: \abc\bdc\x.txt is a route from the root directory of drive D to the x.txt file. Relative Path: A route from the current directory to a file or a directory. For example: C:\XYZ>DIR d: \abc\bdc\x.txt means to view the d: \abc\bdc\x.txt file in the C:\XYZ directory. 3. Directory Operation Commands MD - Create Directory Format: MD path + directory name CD - Enter Directory Format: CD path + directory name CD.. - Exit one level of directory CD\ - Return to the root directory RD\ - Delete an empty directory |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |