Hi Guys,
Is it possible to copy the folder name and folder size only to clipboard in MB and GB?
e.g
Pictures [25.94GB]
Documents [850MB]
Thanks
Copy Folder name and File Size to Clipboard
Re: Copy Folder name and File Size to Clipboard
Only via scripting...
Code: Select all
$data = "";
foreach($item, <get SelectedItemsPathNames <crlf>>, <crlf>, "e") {
if (exists($item) == 1) { continue; }
$bytes = foldersize($item, "<r>");
if ($bytes < 1073741824) { $size = round($bytes / (1024 * 1024), 2) . "MB"; }
else { $size = round($bytes / (1024 * 1024 * 1024), 2) . "GB"; }
$data .= gpc($item, "base") . " [" . $size . "]" . <crlf>;
}
if ($data) { copytext $data; }
One of my scripts helped you out? Please donate via Paypal
Re: Copy Folder name and File Size to Clipboard
Thanks so much! that worked perfectly.highend wrote: ↑30 May 2020 18:51 Only via scripting...Code: Select all
$data = ""; foreach($item, <get SelectedItemsPathNames <crlf>>, <crlf>, "e") { if (exists($item) == 1) { continue; } $bytes = foldersize($item, "<r>"); if ($bytes < 1073741824) { $size = round($bytes / (1024 * 1024), 2) . "MB"; } else { $size = round($bytes / (1024 * 1024 * 1024), 2) . "GB"; } $data .= gpc($item, "base") . " [" . $size . "]" . <crlf>; } if ($data) { copytext $data; }