I have caught myself “cheating” on the system.
When in a rush, I sometimes deviate from the JD system.
To enforce dicipline, I asked AI to create a script for XYPlorer to check folders in current folder, and then increment by one - prompting what to name the new folder.
Here’s the script, if useful to anyone:
:: // Step 1: Get all folders in current directory (non-recursive)
$folders = folderreport("dirs", "r", <curpath>, , , 0);
// Step 2: Initialize max Johnny.Decimal number
$maxJD = 0;
// Step 3: Loop through folder names to find highest JD number
foreach($f, $folders, <crlf>) {
$folderName = gpc($f, "file");
$prefix = substr($folderName, 0, 5);
if (regexmatches($prefix, "^\d{2}\.\d{2}$")) {
$num = replace($prefix, ".", ""); // e.g., 00.01 → 0001
if ($num > $maxJD) {
$maxJD = $num;
}
}
}
// Step 4: Increment the number
$nextNum = $maxJD + 1;
// Step 5: Pad to 4 digits manually using substr (simulate right())
$nextNumStr = "0000" . $nextNum;
$nextNumStr = substr($nextNumStr, -4); // take last 4 chars, e.g., "0002"
// Step 6: Convert to Johnny.Decimal format: NN.NN
$nextJD = substr($nextNumStr, 0, 2) . "." . substr($nextNumStr, 2, 2); // e.g., "00.02"
// Step 7: Ask for folder description
$desc = input("Enter description for new folder:", "New Description");
if ($desc == "") { end "Cancelled."; }
// Step 8: Build full folder name and create it
$folderName = "$nextJD $desc";
$fullPath = "<curpath>\$folderName";
run "cmd /c mkdir ""$fullPath""";