I assume these are known problems with the XDEL command in version 1.3 RC1, but this regards two situations:
1) where you want to delete all files of the same extension that exist one folder level down from where you execute the command. It does not delete the files, at least in the situation where the directory name contains an extension (ex: WPTAIL.UNI directory in FreeDOS\AppInfo). To get around that problem I used the DIR /B /S . > delete.lst command to create a barebones list of files to be deleted using the '@' option. That did work.
2) the next thing I tried to do is delete all the empty directories with the .UNI extension using the command XDEL *.UNI /D. That does not work as upon execution, the command always truncates the last letter of the extension. So when it gets to deleting WPTAIL.UNI, it reports that it cannot delete WPTAIL.UN (which does not exist). I renamed directory to WPTAIL.UN thinking that will work but it results in a report it cannot delete WPTAIL.U, and when you rename by removing the extension entirely, it says it cannot remove the directory name (which is finally correctly represented).
Related to the first issue with XDEL is that when trying to delete all instances of a filename in subfolders (using a wildcard), the prompt does not come up until AFTER I hit enter or another key. In other words, the action I take precedes the prompt and the command terminates without the answer to the prompt being received by the program.
Note, the asterisks were removed from the wildard in the first command example I gave.
DIR /B /S . > delete.lst
Supposed to be DIR /B /S (star-dot-star) > delete.lst
Thanks for letting us know. I also saw your report on the freedos-user list. This is definitely a broken XDEL.
TODO: will either fix or remove from next distro.
Don't know if the point was missed but the wildcard somehow didn't show
in the command example I gave back on August 25th.
DIR /B /S . > delete.lst
was supposed to read as...
DIR /B /S {star dot star} > delete.lst
Thanks,
Steve
Last edit: Jim Hall 2021-06-19
Additional testing in FreeDOS 1.3 RC4 .. testing the last item mentioned in this bug report:
If I go into a directory with files that I want to delete, and type:
XDEL README.TXTthen the program prints this:..then XDEL just pauses until I hit Enter, then I see this extra line printed:
..and the README.TXT file remains.
If I re-run the same command and press
ywhen XDEL pauses, it prints:..and the README file file is now deleted. (no output)
I think the problem is that XDEL is not flushing stdout when it asks for the keyboard input. So the
Is this what you wish to do? [yn]is stuck until stdout is flushed whenYis printed after confirmation.Testing that theory, if I instead type:
XDEL /Y *.EXE(the/Yoption indicates "always answer yes") the exe program in the current directory is deleted. (no output) That's because XDEL didn't need to print a prompt.Similarly,
XDEL /N *.TXT(the/Nindicates "no warning") the text files in the current directory are deleted. (no output)BTW, using both
/Nand/Yas options to "delete specified files with no warning" seems odd and dangerous to the user. From the user perspective, you might assume/Ymeans "always yes" and/Nmeans "always no" .. but actually they both mean the same thing.But that's documented in the
/?help, and even has a "CAREFUL!" message on that option .. so I guess this is as designed.Testing deleting directories with extensions .. I created two empty directories, TEST1.DIR and TEST2.DIR
If I type
XDEL *.DIR /D /Yas indicated in the bug report, I get this output:(Not that it matters, but I get the same if I run the command with the options up front as
XDEL /D /Y *.DIR)Same problem if I name the directories on the command line, without globbing:
XDEL TEST1.DIR TEST2.DIR /D /YThe
/Doption is documented in/?as "remove empty subdirectories" so this seems the correct option.Interestingly, if I add the
/Soption, the directories are deleted:XDEL *.DIR /d /y /s..and I don't get any output, and the TEST1.DIR and TEST2.DIR directories are deleted.
So this seems to be an issue of what options you provide to XDEL to get it to delete subdirectories for you. Maybe the
/Soption is the correct option for that, and not just/DExcept that (after I create the TEST1.DIR directory again) running
XDEL TEST1.DIR /y /sdoesn't delete the directory.Maybe XDEL really needs both
/Sand/Dto delete an empty directory.Also: bug is reproduced without extensions. If I have a TESTDIR directory, and try to delete it with
XDEL TESTDIR /d /yI get this output:..and the directory is not deleted until I run
XDEL TESTDIR /d /y /sThis is probably a result of the line:
file[strlen(file)-1]=0; // remove final '\\'It came to my mind, that you are just using the wrong syntax. So I tried
XDEL TESTDIR\ /d /y:Next try:
XDEL TESTDIR\*.* /d /y--> no output, but TESTDIR still present.HISTORY.TXT says:
Not to remove TESTDIR in our test case seems to be correct. But then, why does
XDEL TESTDIR /d /y /sso?This is by design:
By the way: XDEL source code is really hard to read for me w/o syntax highlighting. Good, that I have FED.
Last edit: Robert Riebisch 2021-06-19
Either way, XDIR seems like it has some issues (not flushing stdout, not showing full dir name on error) and seems confusing (
/Svs/D)..so maybe we don't need XDEL in the FreeDOS distribution? Not seeing the benefit to this program since we already have DEL and RMDIR and DELTREE.
Regarding the benefit:
So maybe we should just fix the bugs and quirks.
Hi,
I just tested xdel204 (older version from Ibiblio): The result is:
a) on a real DOS machine xdel204 /? shows the help whereas
b) in Virtualbox xdel204 /? hangs without showing the help
xdel206 shows the help in both machines but wants the answer to the question "Is this what you want" before. It would be fine to fix this first to find out if there are more problems with it.
Thx.
Hi,
I just had a short mail contact with the programmer of xdel - and he fixed the "answer-question" bug in one day.
Please check if everything works fine now.
@Jerome: There is a lot of NLS support files on your site, could you please add them?
Thx.
Thanks Willi,
I updated the package for GitLab Archive Package and the Unstable Updates version.
Also, I put a raw version for @jhall1 in the file mirrors on ibiblio.
Hi, I am the author of XDEL 2.06. Sorry but I didn't know about these bugs until recently as I have been notified by private email and I haven't seen it in the email lists :(
AS a justification, I needed XDEL functionalities for some automatic instalations .BAT, instead of doing just what I needed writing a clone of DR-DOS XDEL seemed a better option. Someone converted it to NLS for me, thanks, but I don't remember who it was :(
I have made a XDEL 2.07 to correct the prompt not showing bug.
Unfortunatly I cannot reproduce the delete directory problem, can someone help me with this. Maybe it only shows in certain environments
Hello Alain,
I carefully detailed the problem and what you would need to do to see
it.
It happens with the XDEL command that is/was part of FreeDOS 1.3 RC1
In this case it was installed in a VirtualBox for Windows VM but that
should not matter.
If you like we can get together sometime on a TeamViewer session after I
setup my FreeDOS VM again and I can show the problem to you.
Thanks for your reply,
Steve Sybesma
On 2022-05-25 06:26, Alain Mouette wrote:
Links:
[1]
https://sourceforge.net/p/freedos/bugs/_discuss/thread/840f000fb8/4099/attachment/xdel207.zip
[2] https://sourceforge.net/p/freedos/bugs/246/
Related
Bugs: #246
Hello everyone,
My email to Alain bounced back to me. Not sure why.
The CC email showing for him is: alainm3@users.sourceforge.net
That may be why he didn't see it in the mailing list.
Steve Sybesma
On 2022-05-25 08:10, steve@vwebr.net wrote:
Links:
[1]
https://sourceforge.net/p/freedos/bugs/_discuss/thread/840f000fb8/4099/attachment/xdel207.zip
[2] https://sourceforge.net/p/freedos/bugs/246/
Related
Bugs: #246
I did found a way to reproduce it, I used FreeDOS pure in VirtualBox.
Now I can fix it :)
Last edit: Alain Mouette 2022-05-26
Fixed :)
This was ultimately caused by omitting the "\" at the end of the directory name. Ok now both ways.
Please test further.
SideNOTE: I feel that there is also some confusing and conflicting reports about options. Please suggest how I can improuve option's descriptions, or eventialy fix it if it is really buggy
The bugs were fixed.
I think this ticket can be closed.
Last edit: fritz.mueller 2024-08-16