Rename folder at a certain size

Microsoft Windows server 2003 terminal s...
May 1, 2010 at 01:08:09
Specs: Windows XP, 1.6Ghz/4GB
Hi all

I am trying to create a batch file that will
rename a folder when it reaches a certain size.

Eg. c:\folder\test
reaches 2GB in size, I want to rename "test"
to "test2" in the same subfolder, eg.
c:\folder would contain "test" and "test2"

I have tried all the easy builders, but just can't
get it to do what I need.


See More: Rename folder at a certain size

Report •

May 1, 2010 at 19:21:15
@echo off & setLocal EnableDELAYedeXpansion

pushd c:\folder
for /f "tokens=* delims= " %%a in ('dir/b/a-d test') do (
set Z+=%%~Za
if !Z! gtr 2000000000 (
ren test test2
md test

Helping others achieve escape felicity


Report •
Related Solutions

Ask Question