Link to home
Start Free TrialLog in
Avatar of mesach
mesach

asked on

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?
Avatar of DrWarezz
DrWarezz

>"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?
Avatar of mesach

ASKER

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. :)

[r.D]
ASKER CERTIFIED SOLUTION
Avatar of gilbar
gilbar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mesach

ASKER

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

returns

    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
Avatar of mesach

ASKER

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 :)
Avatar of mesach

ASKER

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 :)