![]() |
Recursively Remove Directories and Content - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: SMcNeill (https://qb64phoenix.com/forum/forumdisplay.php?fid=29) +---- Thread: Recursively Remove Directories and Content (/showthread.php?tid=2212) |
Recursively Remove Directories and Content - SMcNeill - 11-30-2023 Code: (Select All)
You'll need the header file below to place in the QB64 folder for this to work. Just point this command at a directory, and it'll remove all files and subdirectories inside that directory, and then remove the directory itself. Note that there's no "Are you certain" prompt to this, so I wouldn't suggest trying it out on your "C:" drive. My suggestion? Before running, set TESTING to TRUE (any non-zero value), and take a look at what all it'll be getting rid of first for you! Any files you lose with this WILL NOT go into your computer's Recycle Bin, so you can't recover them. This nukes them once and for all, so BE CAREFUL with what you point it at! You've been warned here first, and if you couldn't bother to read this warning... All I can say is, "I hope you regularly keep things backed up. Too bad for you now! /shrug!" |