Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


:)
2896 posts

Uber Geek
+1 received by user: 98

Subscriber

Topic # 154753 6-Nov-2014 15:38
Send private message

We are undertaking a task at work at the moment which involves moving to a new SOE.

To do this, we need to scan every hard drive on each machine, to find out what files are where and what size they are.

For example; I want to scan all of C:\ and exclude the Windows directory, etc etc.


I was going to write a powershell script to handle this, but it doesnt look like it's going to be appropriate, as it runs into the 260 character limit. 


Are there any solutions, either via script or an actual application, that will be able to produce this information?





Create new topic
3442 posts

Uber Geek
+1 received by user: 950


  Reply # 1170170 6-Nov-2014 16:28
Send private message

How knives and bearskins do you want it?

You could always just run a "dir /og /s >dir.txt"  in each drive's root directory

and then dump the directories you dont need/want,

Infrastructure Geek
4057 posts

Uber Geek
+1 received by user: 195

Trusted
Microsoft NZ
Subscriber

  Reply # 1171157 7-Nov-2014 21:03
One person supports this post
Send private message

treesize professional? http://www.jam-software.com/treesize/features.shtml

"Search multiple drives, whole servers and even your entire network neighborhood."

can run a bunch of reports, or export results to many file formats  etc




Technical Evangelist
Microsoft NZ
about.me/nzregs
Twitter: @nzregs




:)
2896 posts

Uber Geek
+1 received by user: 98

Subscriber

  Reply # 1176462 15-Nov-2014 21:22
Send private message

Thanks for the response guys.


I may have a look at tree size, if we run into any other limitations.

I have managed to optimise my script a bit more, and have managed to avoid hitting paths that hit the 260 character limit. It looks like the places where those files are, are mainly program files and Windows directory.


My script now scans the machine, excluding things like Windows, Program Files, Program Files (x86) and a couple of other folders we put their on our SOE. It then inputs the information directory into an SQL database, with the computer name, file name, path, size in MB and current logged in user. So I think we should be sorted for the time being :) I'll see what the Project team things and go from there.

Cheers





Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.