dosbox-staging
dosbox-staging copied to clipboard
Support directories in DELETE command
Are you using the latest Dosbox-Staging Version?
- [X] I have checked releases and am using the latest release.
Different version than latest?
No response
What Operating System are you using?
None
If Other OS, please describe
No response
Is your feature request related to a problem? Please describe.
Under real MS-DOS (and Windows) command prompt, using DELETE command on a directory deletes all files inside that directory non-recursively and leaves the directory itself intact (same as going into that directory and running del *.*
). Dosbox is missing that feature, directories are simply skipped. It might be necessary for some batch scripts.
Describe the solution you'd like
Check if a directory is passed in DELETE command (no wildcards), if yes, iterate over all files inside that directory and delete them.
Describe alternatives you've considered
No response
Add any other context or screenshots about the feature request here.
No response
Code of Conduct & Contributing Guidelines
- [X] Yes, I agree.
DOSbox-X supports that, so maybe code can be picked up from there.
DOSbox-X supports that, so maybe code can be picked up from there.
I've looked at Dosbox-X DELETE command and its code is pretty convoluted, to say the least. Probably better to just write our own implementation.
@kcgen We have DEL to delete files, DELTREE to delete folders. No game/app is named that needs this functionality. I think this is safe to close.
I'd leave this open with a low priority. This could break batch scripts. I'm thinking of non-gaming scenarios, e.g. using batch scripts for dev work to clean and rebuild a project, etc.
Should this issue also be referencing #2956, which also picks up rework of the commandline framework?
Should this issue also be referencing #2956, which also picks up rework of the commandline framework?
Yep, seems related. It's referenced now that you mentioned it :)