Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:03 15 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: xdel - recursive delete

Author Message
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 01:07pm 18 Sep 2020
Copy link to clipboard 
Print this post

Hi again,

The mac/max archiving tools I posted earlier today can quickly leave you with a bunch of unnecessary files and directories on your filesystem. Deleting these one by one using KILL and RMDIR gets old just as quickly. The attached tool, xdel.bas, allows you to easily, recursively remove a directory and all its contents.

Details in the README below. Comments are welcome.

Cheers,
Epsilon.


xdel.zip

xdel recursive delete for Color Maximite2 by Epsilon
----------------------------------------------------
Version 0.1

xdel.bas allows you to recursively delete a directory and all its contents.
xdel.bas also lets you delete files in the current directory matching a filespec. See example below.

Example 1: Recursively deleting directory
-----------------------------------------
> list files
A:/
  <DIR>  bak
  <DIR>  psgdemo
...
14:24 18-09-2020       3042  xdel.bas
3 directories, 12 files

> *xdel psgdemo
Recursive Delete 0.1 by Epsilon
Delete dir(s) psgdemo
Are you sure? (Y/N)? y
 Processing dir psgdemo
 Removing file .gitattributes
 Removing file psgdemo.bas
 Removing file psgmini.inc
 Removing file README.md
   Processing dir .git
     Processing dir logs
     Processing dir objects
       Processing dir 91
       Processing dir 9f
       ...
Done.

> list files
A:/
  <DIR>  bak
...
14:24 18-09-2020       3042  xdel.bas
2 directories, 12 files

Example 2: Deleting files using fspec
-------------------------------------
> list files
A:/
13:59 18-09-2020          23  test1.bas
13:59 18-09-2020          23  test2.bas
14:24 18-09-2020        3042  xdel.bas

> *xdel test*
Recursive Delete 0.1 by Epsilon
Delete file(s) test*
Are you sure? (Y/N)? y
Removing test1.bas
Removing test2.bas
Done.

> list files
A:/
14:24 18-09-2020        3042  xdel.bas
Epsilon CMM2 projects
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1677
Posted: 12:42pm 19 Sep 2020
Copy link to clipboard 
Print this post

Hi epsilon,

your Xdel is a very useful tool, I like it.
Thanks!

But the user interface is kind of improvable, as you certainly know.
Maybe your file tools can be combined with the FileBox?

Kind regards
Michael


PS. I am a little disappointed with the low level of feedback. I think it's important for newbies.
causality ≠ correlation ≠ coincidence
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 09:29am 20 Sep 2020
Copy link to clipboard 
Print this post

Hello Michael,

The interface is intended to be a very simple CLI. For more UI behavior I think it's a good idea to integrate into FileBox.
If you think the CLI needs improvement, suggestions are welcome :-)

Cheers,
Epsilon.
Epsilon CMM2 projects
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 255
Posted: 11:28am 28 Sep 2020
Copy link to clipboard 
Print this post

I put xdel on GitHub:

https://github.com/epsilon537/xdel

and I linked it in at Fruit Of the Shed:

http://fruitoftheshed.com/Colour%20MaxiMite%202%20(CMM2).Example-games-and-other-programs.ashx?NoRedirect=1#Utilities_8&NS=Colour%20MaxiMite%202%20(CMM2)

Cheers,
Epsilon.
Epsilon CMM2 projects
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025