problemas ao tentar descobrir o tamanho da lixeira via .bat

Adren Tech 0 Reputation points
2023-04-03T22:05:13.27+00:00

@echo off
setlocal enabledelayedexpansion

set "pasta=lixeira"
for /f "tokens=1-5" %%a in ('dir /-c/s %pasta%^|find "total de bytes"') do set "tamanho_bytes=%%c"

set /a "tamanho_mb = tamanho_bytes / 1024 / 1024"
set /a "tamanho_gb = tamanho_mb / 1024"

echo Tamanho da pasta: %pasta%
echo Em bytes: %tamanho_bytes%
echo Em MB: %tamanho_mb% MB
echo Em GB: %tamanho_gb% GB

pause esse e o comando pelo que eu sei e c:$Recycle.bin mais da isso: Tamanho da pasta: C:\Users\AppData\Local\Temp Em bytes: 3168518514 Em MB: 3021,73 MB Em GB: 2,95 GB Tamanho da pasta: c:$Recycle.bin Em bytes: 3168518514 Em MB: 3021,73 MB Em GB: 2,95 GB

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,806 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more