|
|
@@ -293,19 +293,35 @@ if (ARE_STRINGS_EQUAL($begin_operation, "Y", true)){
|
|
|
sleep(1);
|
|
|
}
|
|
|
|
|
|
+ $total_items = count($content_map) + 1;
|
|
|
+ $items_remaining = $total_items;
|
|
|
+ $curr_item = 0;
|
|
|
+ $progress_val = 0;
|
|
|
foreach ($content_map as $p => $f){
|
|
|
|
|
|
+ $curr_item++;
|
|
|
+ $progress_val = $curr_item / $total_items;
|
|
|
+ $progress_val *= 100;
|
|
|
+ $progress_val_d = number_format((float)$progress_val, 2, '.', '');
|
|
|
+
|
|
|
+ // TODO: Only perform this check if skip_directories is TRUE.
|
|
|
if (!is_dir($p)){
|
|
|
|
|
|
+
|
|
|
$new_path = dirname($p) . "/" . $content_map_new[$p];
|
|
|
$cmd = "mv \"" . $p . "\" \"" . $new_path . "\"";
|
|
|
|
|
|
+ if ($display_progress)
|
|
|
+ echo " >>> [Progress: " . $progress_val_d . "% (" . $curr_item . "/" . $total_items . ") | Items Remaining: " . $items_remaining . "]\n";
|
|
|
+
|
|
|
if ($display_full_cmd)
|
|
|
echo " >>> " . $cmd . "\n";
|
|
|
|
|
|
exec($cmd);
|
|
|
}
|
|
|
|
|
|
+ $items_remaining--;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
echo " > Operation complete.\n";
|