![]() |
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-19 01:56 |
47,814 topics / 349,908 posts / today 1 new / 48,259 members |
| DOS疑难解答 & 问题讨论 (解答室) » [Discussion] Directly moving directories in MSDOS |
| Printable Version 1,497 / 12 |
| Floor1 willsort | Posted 2006-04-07 13:47 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
───────────────── Moderator Record ───────────────── Executed by: Will Sort Action: split thread: 《19952 - How do you rename a non-empty folder under DOS?》 Note: the discussion content and direction within the thread diverged significantly ───────────────── Moderator Record ───────────────── I noticed long ago that the MOVE in MSDOS and Win9x seems a bit “off-task.” Its handling of directories can only be understood as renaming, while to move a directory you have to specify the files inside it and move them all together. But in reality, moving a directory is still essentially just a change to the file directory table; for example, MOVE in CMD can directly move it. I wonder whether you can clear up this confusion for me, and perhaps provide a command-line tool that can directly move directories under DOS. [ Last edited by willsort on 2006-4-8 at 23:13 ] |
|
| Floor2 DOSforever | Posted 2006-04-07 14:09 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Reply to 笑天:
I can understand what you mean, but if you're trying to save effort, why insist on moving it directly? The limitation of traditional DOS MOVE is that it can only handle directories at the same level. If the move is between different levels or across different drives, then it can only operate on files. But 4DOS can perform any of the above operations, and it can do so with subdirectories included. |
|
| Floor3 Wengier | Posted 2006-04-08 02:49 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
willsort:
As I recall, the MOVE command in a Win9x DOS window actually can directly move directories, although under pure DOS it can only rename directories. |
|
| Floor4 willsort | Posted 2006-04-08 14:08 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
Re Wengier:
This really was a mistake in my memory, so I correct it here and apologize: Win98's MOVE indeed can directly move folders. Re DOSforever: I tested with 4dos7.50 under msdos7.10, and found that its move still moves the files inside the directory. For example, it cannot pass the following test: md src md dst move src dst As for move between different drives, that's another matter. Even under XP it is still a copy-plus-delete operation. |
|
| Floor5 DOSforever | Posted 2006-04-08 17:56 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Reply to 笑天:
Oh, now I understand what you mean. You want move to work like NC's F6(rename/move) function, so that operations on directories are just like operations on files. Right? From your example, you want to move src under the dst directory so that it becomes a subdirectory under dst, right? You can do it like this: move /d src dst Just answer y. |
|
| Floor6 willsort | Posted 2006-04-08 22:37 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
Re DOSforever:
I just tested move /d src dst, and it still reports File not found "c:\test\src\*.*" . The same happens with move@4dos under both MSDOS6.22 and Win98Se. Also, 4dos seems not to recognize the msdos7.10 version, and therefore limits part of its functionality, such as the command-line documentation for commands. |
|
| Floor7 DOSforever | Posted 2006-04-08 22:47 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Hehe, it really does say "File not found", but you can go in and take a look: the src subdirectory is already under dst. The reason it reports "File not found" is that your src directory was empty to begin with, so move thinks there are no files to move.
Also, I'm not sure what you mean by “the command-line documentation for commands”; what functionality is missing? |
|
| Floor8 willsort | Posted 2006-04-08 23:04 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
Re DOSforever:
I did not observe any visible changes in src or dst. And even if src has indeed been moved into the dst directory, File not found still shows that 4dos intends to move the files inside the directory. But that is unnecessary: moving a directory only requires changing the directory's own FDT, and should not require changing the FDTs of the files and subdirectories under it. By command-line documentation I mean the help information for 4dos commands. For example, the results of move /? under msdos7.10/NTs and under msdos6.xx/win9x are different; I have not observed the other limitations, so I can't be sure, but judging from 4dos's installation prompt under NTs, there do seem to be certain functional restrictions. |
|
| Floor9 Wengier | Posted 2006-04-09 02:02 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
willsort:
I tried the full 4DOS 7.50 version downloaded from the JPSoft website (now free to download, no registration required) under MS-DOS 6.0/MS-DOS 7.1/Win98SE/WinXP, and found that whether I extracted it directly for use under MS-DOS 6.0/MS-DOS 7.1/WinXP, or installed it under Win98SE and then used it, running MOVE /? showed no differences at all; in every case it displayed the help information. So it seems there is no such functional restriction. If there is any difference, it may be related to other configuration factors. |
|
| Floor10 wl00560 | Posted 2006-04-09 14:28 |
| 银牌会员 Posts 709 Credits 1,384 | |
|
4dos of course recognizes dos710, but the OP's question was also something that confused me for a long time. Later I got too lazy to keep digging into it, so I just used nc.
|
|
| Floor11 willsort | Posted 2006-04-09 18:38 |
| 元老会员 Posts 1,512 Credits 4,432 | |
|
Re Wengier:
It has now been confirmed that when running 4dos.com, if it does not have support from 4dos.hlp, then when using command lines like move /?, it will be unable to display the help documentation. Therefore, there is no compatibility problem between 4DOS and MSDOS7.10. In addition, after transplanting the Win98 MOVE for use under MSDOS7.10, the result was still that it could not directly move directories; the same was true in Win98 real DOS mode. Based on this, I infer that direct directory moving is evidently supported by Windows. |
|
| Floor12 DOSforever | Posted 2006-04-10 23:13 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
???
I'm getting a bit confused reading this. Maybe I haven't understood exactly what you mean by “directly.” At first I understood it as you possibly meaning the physical movement of files. That's why I said, “if you're trying to save effort, why move directly?” Now it seems you mean that the move command should “directly” take the directory itself as the object of operation, rather than the files inside the directory. Just like NC's F6 function I mentioned earlier. If that's what you mean, then I don't think there's much to discuss, because under traditional DOS, move simply has this characteristic. In fact, this characteristic was inherited from the traditional behavior of DOS command operation objects: that is, if a filename is assumed to be a file, then the operation is performed on that file; if it is a directory, then the operation is performed on the files inside that directory. dir, del, and copy are all like this. I think both you and I understand that point. When DOS originally added the move command, it likewise had to preserve this characteristic, so there was no such “direct” behavior as you imagine. (Actually, when we first started using the move command, we all made this same taken-for-granted mistake: strange, why can't move move directories? And even when it does, it can only do so between the same level—what kind of move is that, isn't that just ren? Hehe.) Actually, your current confusion (in my opinion) is because you've used Windows for so long that you've unconsciously been too deeply “poisoned” by it. You've reversed some Windows operating habits back onto DOS. (Hehe, actually I also feel that after using Windows too long, my brain has gotten duller.) There is one point I left out earlier; it should be this: move /d src dst\src This way it can create the src subdirectory under dst, but the source src directory still remains, and the reason is still the DOS operation-object characteristic I mentioned above. provide a command-line tool that can directly move directories under DOS. I'm afraid probably not. Because everyone wants to preserve this DOS operating characteristic, unless someone now sees your idea, 笑天, and redevelops one 4DOS.COM really does give different help prompts in different environments, but this does not refer to the separate help prompt for each individual command; rather it refers to the “question mark” help prompt, that is "?", similar to FASTHELP in MS-DOS. Under a pure DOS environment, compared with MS-DOS 7.X and the DOSBOX under Win9x, it lacks the two commands lock and unlock. but judging from 4dos's installation prompt under NTs, there do seem to be certain functional restrictions. I have never installed/used 4DOS in an NTs environment. It seems that from your practical testing, my guess has been confirmed. http://www.cn-dos.net/forum/viewthread.php?tid=15228&page=1 a passage in my post #10 there |
|
| Floor13 6622186 | Posted 2007-10-04 00:46 |
| 高级用户 Posts 411 Credits 894 | |
|
Asking this shows ignorance; then just use "Cut".
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |