Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 3rd, 2006, 8:35 AM   #1
Immoranimf
Newbie
 
Join Date: Mar 2006
Posts: 2
Rep Power: 0 Immoranimf is on a distinguished road
Open File List with File Sizes

Please help.

I am trying to create, or find, a program that will show a list of open files on a Windows 2000/2003 server AND provide the size for each of those files. The file size information is critical. The programming language is irrelevant, but simpler would be better. Ideally, I would like to launch and run the program from a remote workstation.

The idea for this project comes from the following scenario:
Our IT department gets a page when a server if running low on free space. Watching the drive shows the free space shrinking. We need to find out which file is growing in order to determine who is eating up the free space.

I have tried looking through several different programming forums without being able to find any reference on how to pull a list of open files. I'm sure I'm just not using the right keywords. If someone could point me in the right direction, I would be very grateful.

FYI: I did find one product that supposedly does this ('Open File List' from http://www.merxsoft.com/free/ofl.htm), but the file sizes do not appear when run with the -D switch, as noted in the documentation. I tried writing the author over a week ago, but have received no response.

TIA.
Immoranimf is offline   Reply With Quote
Old Apr 3rd, 2006, 9:19 AM   #2
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
First off, welcome to the forums.
Secondly, should that be something like SpaceMonger or something like this?

Or even different. I couldn't access the 'open file list' site. Probably down.

I have a subscription to a magazine, where I read about a program that does this. Too bad I forgot how the program is called.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 3rd, 2006, 9:36 AM   #3
Immoranimf
Newbie
 
Join Date: Mar 2006
Posts: 2
Rep Power: 0 Immoranimf is on a distinguished road
Both very nice programs, but not what I need.

What I'm trying to collect is just the file sizes for the files that are open. To scan the entire server hard drive twice and then compare all the results would take far too much time.

Unfortunately, when the files are growing, they grow very quickly (gigabytes in minutes) and we have very little time to react before the drive is full.

FYI - You could not open the link because of the parenthesis on the end of the link. Here is the link without the parenthesis:
http://www.merxsoft.com/free/ofl.htm
Immoranimf is offline   Reply With Quote
Old Apr 3rd, 2006, 5:03 PM   #4
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 816
Rep Power: 4 The Dark is on a distinguished road
Is that program you mentioned a console program? If so, you could pipe the output through a script (python, perl etc) and grab the file name from the fourth column. Then you could look up the size yourself.

Alternatively you could write a program that uses the NetFileEnum function, which lists all the files that are open via network connections. A quick google shows this source code which could be modified to do what you want fairly easily.
The Dark is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:47 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC