Full Version: Batch Help
c°h°
Hi,

is there a way to get the drive with most space in a batch variable?

i know my english lacks a bit so i give it in pseudo code:

set Dr:= "Drive with most space"

dir %Dr%:\


this should list the treeroot of the drive with most space available on this workstation.

tia 4 all ideas
ring0
do,

fsutil fsinfo drives

Drives: A:\ C:\ D:\ E:\ F:\ H:\

then, you can...... (something similar to 'df-h' ; i forgot the command for win. )

chkdsk x:

type a.txt |grep "KB are available."

1,144,728 KB are available.

i think bat file supports statements like,

if a > b goto

......................

else


......................

Sorry, it's just rough ideas. ps: grep.exe isn't a command for windows.
have a look at find /?

I hope that points you to a direction?

bipin
lev
QUOTE(ring0 @ Nov 9 2004, 03:05 AM)
do,

fsutil fsinfo drives

Drives: A:\ C:\ D:\ E:\ F:\ H:\

then, you can...... (something similar to 'df-h' ; i forgot the command for win. )

chkdsk x:

type a.txt |grep  "KB are available."

1,144,728 KB are available.

i think bat file supports statements like,

if a > b goto

......................

else


......................

Sorry, it's just rough ideas. ps: grep.exe isn't a command for windows.
have a look at find /?

I hope that points you to a direction?

bipin
*



pretty easy actually

http://www.jsiinc.com/SUBK/tip5300/rh5350.htm

also there is lotsta cscript stuff to do this
ring0
stupid me, i knew fsutil must have this stuff... didn't bother to check throughly.

fsutil volume diskfree c:
cool_one
i'm not sure this is possible
why can't you just use some API calls through rundll32?
c°h°
thx i try this sounds good
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.