Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to detect file operations in the window using VB code?

Posted on 2003-03-02
3
Medium Priority
?
160 Views
Last Modified: 2010-05-01
Is it possible to detect any operation on files, such as move, delete, rename a file. And can vb code undo such file operation? What I mean is a real time detection that whenever a operation is done on a file, the vb code can detect.
0
Comment
Question by:chpchai
  • 2
3 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8052101
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 150 total points
ID: 8052108
0
 

Expert Comment

by:applayer
ID: 8053858
It is possible to detect such operations on files through a number of means.  I would recommend using a visual basic timer control in combination with the FileSystemObject object offered under the "Microsoft Scripting Runtime" reference.

Basically, the visual basic timer control can execute code which you specify on a given interval.  The FileSystemObject can get you information about folders and files including names of folders, names of folders in files, and file properties such as read-only and archive.

Depending on your situation, you can have a program with a timer...the timer scans folders or files you are interested in, and reports changes to you based on differences found between times in which the timer control ran specified code.  

..I'd be happy to elaborate if you give more specifics about your situation.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

577 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