Posted: Tue Jan 05, 2010 6:56 am Post subject: Need some batch help
i've got some practicing in batch scripting
and i'm a little bit stuck
my goal is to get the free size of my C: drive in bytes and check if it's over or below 50,000 bytes
what i've done so far is
Code:
@echo off
dir | find "bytes free" > freespace.txt
for /f "tokens=3" %%i in (freespace.txt) do set space=%%i
echo free space on drive c - %space% bytes.
so now at my %space% var i've got the free size but with commas like: 19,153,513,151 bytes
and i'd like to delete the commas so i could compare this value with 50000
how would i do that?
and yet is there any other way to do what i want to do?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum