Digsy Posted April 19, 2005 Author Share Posted April 19, 2005 Well the drive I have to interrogate is a quota on a 1.4 terabyte RAID array. I have no idea how big it is, but my department's toplevel directory alone is 210Gb! It was close to knocking off time and I didn't fancy waiting arund to see how long it took... If all is well then I'll use the new and improved version to just look for files I am interested in tomorrow. Thanks again. If we ever meet up I owe you a beer or three Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 20, 2005 Author Share Posted April 20, 2005 Gaahhh! One final small problem: The scan ran file, except that it produced a larger file than I can open in Excel (so I'll have to start using the filtering in the latest version). Problem is that some numpties here use commas in their filenames, and that screws up the .csv file. Is there a way that you can either let me specify the delimiter character or use something else? I can't think what you would use as it would have to be a character that was illegal to use in a pathname or filename. Maybe TAB? Also, eliminating the time data from the date stamp would be handy, if possible (or maybe just putting it in a separate column). Finally, a header row "Name,Size,Date" for example, would be handy for pulling the data directly into Excel. Sorry to be a pain but I'm really close to having a useful tool here Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 20, 2005 Share Posted April 20, 2005 Commas in filenames... Whatever next?! When I read that you were searching through 1.4TB, I thought the size of the output file might be a problem!! I'll amend it to delimit using tabs rather than spaces, but I'm a bit busy right now. Will try to do it later. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 20, 2005 Author Share Posted April 20, 2005 Triffic! I'm feeling a bit bad about taking up your time, though Your continued help is appreciated. I've spent the day constructing an Excel spreadsheet that uses your program to: a) Interrogate the drive for certain file types, and create simple text lists. b) Uses ODBC to import these lists into the spreadsheet (hence the need for fixed column headers). c) Works out the top nth percentile file size (user-definable). d) Writes out text "hitlists" of abnormally large files. Tomorrow I'll write a webpage that links to the text files, and that can be published to the intranet so everyone can see where the large files are! To give you an idea of how daft large our files can get, even if I set the spreadsheet to allow 99.9% of the files (based on size), it still identifies over 11Gb of large files to be marked for attention! So.... If you could find time to (a) add the column headers, (b) make the output tab delimited, and © fix the filespec matching (doesn't seem to work at all with *.zip) then that would be grand and I promise I'll never ask you another favour ever again! Quote Link to comment Share on other sites More sharing options...
Dash Rendar Posted April 20, 2005 Share Posted April 20, 2005 Okay, this version writes column headers... Name Size Date. It delimits columns by tab. The filespec matching is better, but *different*. The problem is that the JVM is too clever for its own good. If you specify *.zip as a parameter on the command line (as we have been doing), it first looks to see if there are any files in the current directory that match and passes those files to the program, rather than the actual string "*.zip". Very annoying. Easily fixed by passing the parameters in a properties file, but I can't be arsed at this stage. NOW, if you want to filter by extension, you need to pass the parameter without the star. E.g. instead of, *.zip Pass: .zip So, your command might be: filelister c:\ .zip This actually uses regular expressions under the hood. Glad your spreadsheet is doing what you want it to. If your files are really big, you might find a database more performant. Quote Link to comment Share on other sites More sharing options...
Digsy Posted April 21, 2005 Author Share Posted April 21, 2005 Its all working sweetly on a small test environment now First big run tonight. Cheers, dude 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.