Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Monitoring file usage in a folder

Posted on 2004-08-31
5
121 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

808 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