get c:\ space

Dell PRECISION
October 30, 2009 at 05:54:38
Specs: win xp 5.1.2600, 3mhz/2 gig
Hi all!

I want to get the free space and I know there are loads of topics already. I have read through them.
I just wanted to know if something like this would work. Please take a look. Thank you.

dir c:\|find /i "bytes free" >> set space=

You see I want to set the variable "space" without creating a temporary file on my hard drive.


See More: get c:\ space

Report •


#1
October 30, 2009 at 07:44:30
I have this but as you see it creates a file called 1.txt
There must be a way

@echo off & cls
dir c:\|find /i "bytes free">> 1.txt
setlocal enabledelayedexpansion
for /f "tokens=* delims=" %%A in (1.txt) do (
set line=%%A
set line=!line:~26,-11!
echo.!line!)
del 1.txt & pause>nul


Report •

#2
October 30, 2009 at 10:34:13
Where is everyone today?
for /f "tokens=3" %%a in ('dir c:\ ^|find "bytes free"') do set space=%%a


Report •

#3
October 31, 2009 at 03:40:50
Hi R2,

I'm off to a bit of a slow sttart.


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions

#4
November 2, 2009 at 00:42:19
Thank you Razor2.3, exactly what I wanted.

How do you write your answers in a different font?


Report •

#5
November 2, 2009 at 01:22:33
Look at the html for this page.

In firefox: ctrl-u


=====================================
Helping others achieve escape felicity

M2


Report •

#6
November 2, 2009 at 01:26:54
Thanks M2 will do

Report •


Ask Question