Digsy Posted April 15, 2005 Share Posted April 15, 2005 I have been given the most unbelievably cr@p job. I have got to go through our corporate network and find files which are taking up a large % of the available space, which are unnecessary, which can ce archived, etc, and then find some way of getting the people who own these files to rationalise them. Clearly, there is no way I can do a decent job of this without opening all the files myself to check the contents so I am going to have to find some statistical way of doing it. What I want is something that will spider its way through the whole drive overnight and make a fecking huge database containing useful info like: File and path name. Size. Last accessed date. etc. I am thinking of then saying that "for .ppt files the top 10% of the space used is made up from 28 files which should be attended to. Here is a list of the files." and so on. I have been trying to get DIR to make a list contanining the information so I can bring it straight into Excel, but with no luck. In the good ol' days I could have written something in QBasic, but sadly no more. Is there a freeware programme that I can use, or some other IT trick? TIA. Quote Link to comment Share on other sites More sharing options...
jonshaw_uk Posted April 15, 2005 Share Posted April 15, 2005 have you tree treesize? sounds like it would do the job for you Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 What is treesize? Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 Oh I see. No, that won't do it. I need an ASCII listing or .CSV file or something that gives the full file and pathname for every file of a certain type, its size and its last accessed date. Then I can use Excel to generate a target list of files to be looked at for archiving off the system. Quote Link to comment Share on other sites More sharing options...
Castle Posted April 15, 2005 Share Posted April 15, 2005 Couldn't you use an old app like Disk Wizard? that would give you all the details your after Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 God knows, I'm not an IT bod. I'm an Engineer. If I need to use a third part app to do this then I'll have to dowanload it. I'm trying a 21 day trial of "Size Explorer" now... Quote Link to comment Share on other sites More sharing options...
Castle Posted April 15, 2005 Share Posted April 15, 2005 It gives you the name of the file, Type, Creator, Size, Creation, Modification, Location and you can just scan the hard drive or CD's...don't know quite what your after Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 Balls! Size Explorer will do EXACTLY what I want, but the "export data" feature is disabled in the trial verison. Tits. Arse. Where do I download Disk Wizard, then? Quote Link to comment Share on other sites More sharing options...
Bobbeh Posted April 15, 2005 Share Posted April 15, 2005 Is this on Windows or Unix? Quote Link to comment Share on other sites More sharing options...
GeordieSteve Posted April 15, 2005 Share Posted April 15, 2005 dir /o /s >sizes.txt ?? Quote Link to comment Share on other sites More sharing options...
Ian C Posted April 15, 2005 Share Posted April 15, 2005 Balls! Size Explorer will do EXACTLY what I want, but the "export data" feature is disabled in the trial verison. Tits. Arse. Where do I download Disk Wizard, then? Speak to Jake Try Seqoia for size. I find it's invaluable on servers that have stuffed their HDs full with crap as you can visually spot the fat bastard file that's done it. Might be useful, sure is pretty -Ian Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 dir /o /s >sizes.txt ?? That won't do it either. I need the file and pathnames on the same line in the text file otherwise when I sort the list the paths will get lost. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 15, 2005 Author Share Posted April 15, 2005 Basically this is a one off, so there's no way in hell that the anyone is going to buy any software to do it. Strictly speaking I shouldn't have used even the tiral version of Size Explorer as only the proper IT department can install stuff on our PCs. I sure as hell shouldn't be using a Jakesoft version! What a pain in the ass. Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 15, 2005 Share Posted April 15, 2005 Pathnames in the same line? No problem... On WinXP / 2K: dir [filespec] /osne /s /b > [outputfile] E.g. dir * /osne /s /b > filelist.txt dir *.txt /osne /s /b > filelist.txt (/osne = sort by size, name, extension. /s = include subdirs. /b means 'bare format') If that's not good enough, I could whip you up a Java program or some KiXtart or VBScript to do it, but I'm pretty busy right now. Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 15, 2005 Share Posted April 15, 2005 Excuse I for being a pillock! This gives you full paths, but no further info... How completely useless! That's what happens when you don't think before you post!! Let me know if you're still searching tomorrow and (if not too busy) I'll write a utility. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 16, 2005 Author Share Posted April 16, 2005 Cheers Dash. I'll PM if I need anything Top man Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 17, 2005 Share Posted April 17, 2005 Digsy, I've written a program for ya. It's attached here. You will need a Java runtime (or JDK) on your machine to run it. If you haven't got one, you'll need to download the Java runtime from java.sun.com. The current runtime is version 1.5, but it will run on 1.4.2 also (in case you've already got one). Download the attached filelister.zip and extract its contents (two jar files and a batch file) to a folder of your choice. To run the program, open a command prompt at the same location that you extracted the files to. Then run the program like this: filelister is the top level directory you want to interrogate. is optional and defines the files you want to match. If you omit this parameter, all files will be matched (i.e. *). E.g. to find all files in c:\ filelister c:\ To find files matching *.txt under d:\tmp... filelister d:\tmp *.txt The output is in csv format and looks something like this: d:\Installs\settings\Media\Icons\Hodgepodge.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\hole.ico, 3774, 19/10/95 23:25:40 d:\Installs\settings\Media\Icons\Hole In Space.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Hollow Folder.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Holly.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Home.ico, 3774, 03/05/96 11:00:10 d:\Installs\settings\Media\Icons\Home 2.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Homer.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Homer & The Doughnut.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Homer - Be Sharp.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Homer Folder.ico, 2238, 03/07/96 23:00:00 d:\Installs\settings\Media\Icons\Homer In 3D.ico, 2238, 03/07/96 23:00:00 This shows full path, file size in bytes and then the last modified date. The output also contains header and trailer info (e.g. the total number of files found). By default, the output is sent to the command prompt (standard out). You can redirect to a file just like you would with any other DOS command. E.g. filelister c:\ > e:\filelist.txt The program doesn't do any sorting. I recommend that you generate a text file (as shown above), remove header and trailer info and then import it into Excel or a database and sort from there. Hope this is what you were after. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 17, 2005 Author Share Posted April 17, 2005 Well, bloody hel. Thanks very much indeed! That will be ideal if I can get it to run on my pc at work. Not sure whether they have Java installed, or whether my user priveleges would let me install it if they do not. I havn't been able to try it on my home pc yet because I just discovered that I don't have Java either Thanks again! Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 17, 2005 Share Posted April 17, 2005 So get downloading dude! Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 18, 2005 Author Share Posted April 18, 2005 So get downloading dude! Well, I'm on dialup at home so a 15Mb download isn't something to be taken lightly But I shall do it ASAP. However, at work I am on ADSL and I downloaded the package but (as I suspected) I do not have the admin priveleges on my login to install it, so I have had to ask our IT department if they can do it. Beleiev it or not they can be VERY funny about this kind of thing. Watch this space... Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 18, 2005 Share Posted April 18, 2005 No, I do believe it! It's the same where I work. Everyone is security conscious and network admins like their networks as locked-down as they can be. On the other hand, you have a job to do and you need the tools installed to do it. That's my argument anyway!! Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 19, 2005 Author Share Posted April 19, 2005 Dash, I've got problems getting this to work. It seems to bomb out with an error after listing a few dozen lines. I've attached the output here. The error message I'm getting is: Exception in thread "main" java.lang.NullPointerException at com.djl.FileLister.FileLister.processDirectory(FileLister.java:61) at com.djl.FileLister.FileLister.processDirectory(FileLister.java:66) at com.djl.FileLister.FileLister.processDirectory(FileLister.java:66) at com.djl.FileLister.FileLister.main(FileLister.java:51) This was when I used filelister c:\ to try to list all of the files on my local PC. Interestingly, the output stops after it lists CONFIG.SYS, which is a zero-length file. Is this significant? *EDIT* Also, I'm not 100% sure if the filespec matching is working properly. If I search for just the ".bcm" files at the very end of the sample attached, then it finds no files at all. If I search for all ".txt" files then it only finds those in the root directory. Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 19, 2005 Share Posted April 19, 2005 I can't reproduce this error. I don't think it's the zero size file because I have files like that too. However, I've added some error trapping, so hopefully this one will be better. Sorry about that! I should have taken more care!! P.S You're right. The filter doesn't work right. I'm a bit short of time for fixing it right now. Sorry! You'll just have to pull back everything for now. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 19, 2005 Author Share Posted April 19, 2005 Cheers dude. I've left it running overnight. Should be an interesting file to read when I get in tomorrow! Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 19, 2005 Share Posted April 19, 2005 Overnight??? It takes under a minute on my box to do 50GB. Anyway, I've fixed the filespec matching. It's crude, but it does work for things like *.txt and *.bak, whatever. Happy listing... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.