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.


Aaroona

3204 posts

Uber Geek
+1 received by user: 169


#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
wellygary
8810 posts

Uber Geek
+1 received by user: 5287


  #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,



Regs
4066 posts

Uber Geek
+1 received by user: 206

Trusted
Snowflake

  #1171157 7-Nov-2014 21:03
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




Aaroona

3204 posts

Uber Geek
+1 received by user: 169


  #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








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.