Jump to content
The mkiv Supra Owners Club

IT bods. File management program?


Digsy

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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! :D

 

What a pain in the ass.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Well, bloody hel. :thumbs:

 

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! :D

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. You might also be interested in our Guidelines, Privacy Policy and Terms of Use.