I will be thankful, if someone help me.
First of all, my file:
[spoiler]
Code: Select all
@echo off & setlocal ENABLEDELAYEDEXPANSION
cls
echo -==================-
echo Disks:
echo -==================-
for /f "skip=1 tokens=1,2 delims=: " %%a in ('wmic logicaldisk get deviceid^') do (
set "_DRIVE.LETTERS.USED=!_DRIVE.LETTERS.USED!%%a,%%b"
)
set _DRIVE.LETTERS.USED=%_DRIVE.LETTERS.USED:~0,-2%
set _DRIVE.LETTERS.USED=%_DRIVE.LETTERS.USED:,@=, @%
set _DRIVE.LETTERS
echo -==================-
Echo 1. C disk
Echo 2. D disk
Echo 3. E disk
Echo -==================-
set /p op=Input:
IF "%op%"=="1" goto C
IF "%op%"=="2" goto D
IF "%op%"=="3" goto E
echo "%op%" wrong
pause
echo
goto start
:C
echo -==================-
echo
SET "volume=C:"
FOR /f "tokens=1*delims=:" %%i IN ('fsutil volume diskfree %volume%') DO (
SET "diskfree=!disktotal!"
SET "disktotal=!diskavail!"
SET "diskavail=%%j"
)
FOR /f "tokens=1,2" %%i IN ("%disktotal% %diskavail%") DO SET "disktotal=%%i"& SET "diskavail=%%j"
(ECHO(Informacija par disku - %volume%
ECHO(kopeejaa %disktotal:~0,-9% GB
ECHO(pieejamaa %diskavail:~0,-9% GB)
pause
goto exit
:D
echo
SET "volume=D:"
FOR /f "tokens=1*delims=:" %%i IN ('fsutil volume diskfree %volume%') DO (
SET "diskfree=!disktotal!"
SET "disktotal=!diskavail!"
SET "diskavail=%%j"
)
FOR /f "tokens=1,2" %%i IN ("%disktotal% %diskavail%") DO SET "disktotal=%%i"& SET "diskavail=%%j"
(ECHO(Informacija par disku - %volume%
ECHO(kopeejaa %disktotal:~0,-9% GB
ECHO(pieejamaa %diskavail:~0,-9% GB)
pause
goto exit
:E
echo
SET "volume=E:"
FOR /f "tokens=1*delims=:" %%i IN ('fsutil volume diskfree %volume%') DO (
SET "diskfree=!disktotal!"
SET "disktotal=!diskavail!"
SET "diskavail=%%j"
)
FOR /f "tokens=1,2" %%i IN ("%disktotal% %diskavail%") DO SET "disktotal=%%i"& SET "diskavail=%%j"
(ECHO(Informacija par disku - %volume%
ECHO(kopeejaa %disktotal:~0,-9% GB
ECHO(pieejamaa %diskavail:~0,-9% GB)
pause
goto exit
exit
@exit
Is it possible that batch file shows all avaliable spaces for every disk in every computer, ? Maybe someone can edit my file ?
Is it possible to convert Gigabytes to progress bar, not to show free space in gigabytes, but show it as progress bar?