Batch Command for Folder sizes

I am creating a batch file for moving a few folders for safe keeping, and i'm need to have it send me a net send with the folder sizes if possible, so i can,

1. know when the copy is finished.
2. check that it copied everything.

Is there an easy command to do this, I would like to learn WSH but I dont have the time to learn it to implement this.

and can information like this be piped to a net send?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>"I am creating a batch file for moving a few folders for safe keeping"
>" check that it copied everything."

Do you want to copy or move?
mesachAuthor Commented:
Im using Xcopy with the Switches /E /H /K /R /V /Y, If there are better ones let me know.
No, I think XCOPY is the best to use here.

I'm gradually working out how to get the dir size at the moment for you, I'll get back to you soon. :)

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

if you have access to the Resource Kit, its DirUse  command will give you folder sizes.

DIRUSE displays a list of disk usage for a directory tree(s). Version 1.20

DIRUSE [/S | /V] [/M | /K | /B] [/C] [/,] [/Q:# [/L] [/A] [/D] [/O]] [/*] DIRS

/S      Specifies whether subdirectories are included in the output.
/V      Output progress reports while scanning subdirectories.  Ignored if /S is
/M      Displays disk usage in megabytes.
/K      Displays disk usage in kilobytes.
/B      Displays disk usage in bytes (default).
/C      Use Compressed size instead of apparent size.
/,      Use thousand separator when displaying sizes.
/L      Output overflows to logfile .\DIRUSE.LOG.
/*      Uses the top-level directories residing in the specified DIRS
/Q:#    Mark directories that exceed the specified size (#) with a "!".
        (If /M or /K is not specified, then bytes is assumed.)
/A      Specifies that an alert is generated if specified sizes are exceeded.
        (The Alerter service must be running.)
/D      Displays only directories that exceed specified sizes.
/O      Specifies that subdirectories are not checked for specified size
DIRS    Specifies a list of the paths to check.

Note:   Parameters can be typed in any order. And the '-' symbol can be
        used in place of the '/' symbol.

        Also, if /Q is specified, then return code is ONE if any directories are
 found that
        exceed the specified sizes.  Otherwise the return code is ZERO.

Example: diruse /s /m /q:1.5 /l /* c:\users

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mesachAuthor Commented:
Gilbar that looks like it might work for me, but I cannot seem to make it give me the size of the files in the top level dir,

diruse /S /, /* C:\Test2


    Size  (b)  Files  Directory
          650      2  C:\TEST2\New Folder
          650      2  SUB-TOTAL: C:\TEST2\New Folder

          650      2  TOTAL: C:\TEST2\New Folder

there should be 4 files total

also the directorys im working with are about 6-10 gig with lots of files, and i cannot seem to keep this from being verbose.

BTW thanks for all the help
mesachAuthor Commented:
also the dir C:\test1 returns an error(the syntax) because there are no directorys within that folder.

I would have thought there would have been an easy way to get the folder properties
i think that's 'cause you're using the /* switch, you could try is with just the /s. We use it for a monthly size check to see which departments are showing too much inflation and instead of using the /s we generate a diruse for each of the dept folders.  
ps, you're welcome :)
mesachAuthor Commented:
Well that gets me the info i need you get the points, now i can go on to getting it to send that to me in a net send! THANKS
glad to help!  the resource kit rocks!  I don't know how i'd be able to do my job without it.  Now I can get back to my work ( let me know if you need a vbscript to return the members of all the global groups that are members of a particular domain local group, 'cause i made one today :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.