Suppose there are subdirectories under a directory, and there are subdirectories under the subdirectories. Use the following command
dir /s /a-d /tc|sort|find "-"|find /v "Sequence" The result is similar to the following
2006-10-01 19:49 123,392 asdfasdfasd060921-060927.xls
2006-10-01 19:49 123,904 asdfasdfasd060914-060920.xls
2006-10-01 19:49 161,280 asdfasdfasd060831-060906.xls
2006-10-01 19:49 167,936 asdfasdfasd060907-060913.xls
2006-10-07 19:08 160,768 asdfasdfasd060824-060830.xls
2006-10-07 19:13 124,928 asdfasdfasd060928-061004.xls
2006-10-12 00:17 124,416 asdfasdfasd061005-061011.xls
2006-10-19 08:18 124,928 asdfasdfasd061012-061018.xls
2006-10-26 12:22 124,928 asdfasdfasd061019-061025.xls
I want to display the directory name of the file before the file name, and the result is like this. How to do it?
2006-10-01 19:49 123,392 d:\x1\asdfasdfasd060921-060927.xls
2006-10-01 19:49 123,904 d:\x2\asdfasdfasd060914-060920.xls
2006-10-01 19:49 161,280 d:\x2\1\asdfasdfasd060831-060906.xls
2006-10-01 19:49 167,936 d:\x2\2\asdfasdfasd060907-060913.xls
2006-10-07 19:08 160,768 d:\x2\3\asdfasdfasd060824-060830.xls
2006-10-07 19:13 124,928 d:\x4\asdfasdfasd060928-061004.xls
2006-10-12 00:17 124,416 d:\x5\asdfasdfasd061005-061011.xls
2006-10-19 08:18 124,928 d:\x4\1\asdfasdfasd061012-061018.xls
2006-10-26 12:22 124,928 d:\x4\3\asdfasdfasd061019-061025.xls
──────────────── Moderation Record ────────────────
Performed by: namejm
Original title: Ask a dir question
Modified title: How to add the full path to the file name in the dir result
Explanation: The title is too vague, which is not convenient for forum search and management. Three days after this prompt is posted, the original poster has not modified the title. Now, the title is forcibly modified by me, and 2 points of points are deducted from the original poster.
──────────────── Moderation Record ────────────────
[ Last edited by namejm on 2007-2-3 at 08:38 PM ]
dir /s /a-d /tc|sort|find "-"|find /v "Sequence" The result is similar to the following
2006-10-01 19:49 123,392 asdfasdfasd060921-060927.xls
2006-10-01 19:49 123,904 asdfasdfasd060914-060920.xls
2006-10-01 19:49 161,280 asdfasdfasd060831-060906.xls
2006-10-01 19:49 167,936 asdfasdfasd060907-060913.xls
2006-10-07 19:08 160,768 asdfasdfasd060824-060830.xls
2006-10-07 19:13 124,928 asdfasdfasd060928-061004.xls
2006-10-12 00:17 124,416 asdfasdfasd061005-061011.xls
2006-10-19 08:18 124,928 asdfasdfasd061012-061018.xls
2006-10-26 12:22 124,928 asdfasdfasd061019-061025.xls
I want to display the directory name of the file before the file name, and the result is like this. How to do it?
2006-10-01 19:49 123,392 d:\x1\asdfasdfasd060921-060927.xls
2006-10-01 19:49 123,904 d:\x2\asdfasdfasd060914-060920.xls
2006-10-01 19:49 161,280 d:\x2\1\asdfasdfasd060831-060906.xls
2006-10-01 19:49 167,936 d:\x2\2\asdfasdfasd060907-060913.xls
2006-10-07 19:08 160,768 d:\x2\3\asdfasdfasd060824-060830.xls
2006-10-07 19:13 124,928 d:\x4\asdfasdfasd060928-061004.xls
2006-10-12 00:17 124,416 d:\x5\asdfasdfasd061005-061011.xls
2006-10-19 08:18 124,928 d:\x4\1\asdfasdfasd061012-061018.xls
2006-10-26 12:22 124,928 d:\x4\3\asdfasdfasd061019-061025.xls
──────────────── Moderation Record ────────────────
Performed by: namejm
Original title: Ask a dir question
Modified title: How to add the full path to the file name in the dir result
Explanation: The title is too vague, which is not convenient for forum search and management. Three days after this prompt is posted, the original poster has not modified the title. Now, the title is forcibly modified by me, and 2 points of points are deducted from the original poster.
──────────────── Moderation Record ────────────────
[ Last edited by namejm on 2007-2-3 at 08:38 PM ]
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| namejm | -2 | 2007-02-04 09:43 |

