Batch files - nested loop

February 1, 2012 at 04:29:04
Specs: Windows 7
Help to writ batch file script!!!!!!!!!

I want a script that lokkink for free space on the hard disk:
I wrote the following:
@setlocal enableextensions enabledelayedexpansion
@echo off
set gbsize = 1,073,741,824
Set gbsize=%gbsize:,=%

for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do
for /f "tokens=3" %%a in ('dir c:\') do (
set bytesfree=%%a
set bytesfree=%bytesfree:,=%
echo %bytesfree%
endlocal && set bytesfree=%bytesfree%

but it doesnt work, I allways get sytax erro, can you help please?

See More: Batch files - nested loop

Report •

February 2, 2012 at 20:30:24
try this:

fsutil volume diskfree c:

Report •
Related Solutions

Ask Question