Solved

Monitoring file usage in a folder

Posted on 2004-08-31
5
119 Views
Last Modified: 2010-05-02
Hi All.

I run a process which takes about 6 hours per week to run. This process generates 320 excel files, all placed in a certain folder each week. At the start of the following week this folder is cleared and the 320 new files are added.

As this is a tedious task, I sent an e-mail to determine who was using the files. 30 people have access to them but only 4 replied to say they use them. I suspect the number is higher, just that they couldn't be bothered to reply!

To avoid the embarrassment of sending another mail out, I would like to set up a counter that increases by 1 each time a file in that folder is opened. I could easily do this in each individual excel file and aggregate this figure - but there are 320 of them! So it wouldn't be worth my while. Also, I would like to see the user who accesses the files too as it could be the same one each time.

Any ideas?

Thanks for your time


0
Comment
Question by:ronanm1
  • 2
5 Comments
 
LVL 11

Assisted Solution

by:coopzz
coopzz earned 125 total points
ID: 11948114
If your files/folders is on a 2000/xp box you could always watch the open files on the computer management colsole.

TO get to it, it's under start | settings | control panel | Admin Tools | Computer Management  on an XP machine.
 then goto SystemTools | Shared Folders | Open Files

It doesn't to counting but you will see whats being shared at that moment (you have to keep refreshing regularly).

If you have vb.net this is quite an easy thing to implement. he's a link.
http://abstractvb.com/code.asp?A=1081
or
http://www.codeguru.com/vb/gen/vb_system/directoriesandfiles/article.php/c4827/
0
 
LVL 76

Accepted Solution

by:
David Lee earned 125 total points
ID: 11948169
Here's a link to a program that'll monitor a folder or multiple folders for changes.  You could modify the source code to implement the counter you described.

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=41816&lngWId=1
0
 

Author Comment

by:ronanm1
ID: 11963351
Hi,

Sorry for the delay in responding.
Coopzz - I don't have access to VB.Net. Also, I need to know the file usage, not the folder
BDF -  I am reasonably proficient at VB but not to the extent I can modify that code to get what I need.

Perhaps the best way is to bulk add a macro to the 320 workbooks? Is there an easy way to do this? I could then just agggregate the figures? I'd like to know who was accessing them too though :( Any ideas??
0
 

Author Comment

by:ronanm1
ID: 11985807
This works just fine

Dim WkbkName As Object
      Workbooks.Open Filename:="C:\Documents and Settings\DDG\My Documents\Row+1.xls"
        Workbooks.Open Filename:="C:\Documents and Settings\DDG\My Documents\Row+2.xls"
         Workbooks.Open Filename:="C:\Documents and Settings\DDG\My Documents\Row+3.xls"
       
    Sheets.Add
    Sheets("Sheet4").Name = "Log"
    Range("A1").Select
    Cells(1, 1) = "Hen"
    Cells(2, 1) = "Len"
    Sheets("Log").Select
    ActiveWindow.SelectedSheets.Visible = False
    ActiveWorkbook.Save
    Workbooks.Close
    Sheets("Sheet2").Select
    Cells(1, 1) = "='[Row+3.xls]Sheet2'!Cells(1,1)+'[Row+2.xls]Sheet2'!cELLS(1,1)"
   

          For Each WkbkName In Application.Workbooks()
              If WkbkName.Name <> ThisWorkbook.Name Then WkbkName.Close
          Next

       End Sub

Basically add a hidden sheet ("Log") to each listed workbook, and aggregate these in an active workbook on sheet 2.

Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now