w2k maths

|

My Windows 2000 script to check whether the amount of disk used in a certain directory is greater than the amount of free space in a directory on Google Groups hit a snag this morning when someone had 35GB of data and over 100 GB of data available (previously they had <100GB.
I had to change the script so that it now reads as below. (I've out it within the extended entry so that it displays correctly all on one line which my css breaks on this page)

for /F "eol=- tokens=3" %%i in (bytesused%sourcedrive%.tmp) do set filesize=%%i 00000000000000
for /F "eol=- tokens=%tokendf%" %%i in (diskfree%destdrive%.tmp) do set diskfree=%%i 00000000000000
set filesize=%filesize:~0,14%
set diskfree=%diskfree:~0,14%

Categories

Pages

Powered by Movable Type 4.1

About this Entry

This page contains a single entry by published on August 20, 2004 11:02 AM.

New interface to google groups was the previous entry in this blog.

windowsxp checklist for newbies is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.