S
S
sundrey2015-09-28 09:41:46
Java
sundrey, 2015-09-28 09:41:46

How to intercept requests to the file system?

Good afternoon!
Interested in writing a program of the following form:
There is a program that polls the file system for the presence of a file, and if it exists, then actions are performed.
The files are requested from the permanent folder. How can you intercept the request, and after creating a certain file, continue execution?
Or just get the details of the request and create the file later.
The program will be needed for Windows XP or 7.
Are there any examples of how to implement this?
In principle, it is possible in any programming language, I think I can master any for this :)

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Daemon23RUS, 2015-09-28
@Daemon23RUS

for the 2nd version of Process Monitor https://ru.wikipedia.org/wiki/Process_Monitor
https://technet.microsoft.com/ru-ru/sysinternals/b...

Z
Zakharov Alexander, 2015-09-28
@AlexZaharow

Take a look at scriptomatic: https://www.microsoft.com/en-us/download/details.a...
There are many examples of how to set up a watcher for different events in the system. google wmi file watcher

C
CycaHuH, 2015-09-28
@CycaHuH

I would look towards File System Filter Drivers .

A
alexxandr, 2015-10-15
@alexxandr

WMI may well skip the request and do nothing.
Take a look at API hooking on Windows.

S
Stalker_RED, 2015-12-12
@Stalker_RED

This is of course not interception, but in Windows there is such a thing as WSH

var fso = new ActiveXObject("Scripting.FileSystemObject");

var filePath = "C:\\test\\123.ogg";

function doSomething() {
    WScript.Echo("Файл " + filePath + " существует.");
    // Your code here
}

while(true) {
    if (fso.FileExists(filePath)) doSomething();
    WScript.Sleep(3000); // 3 sec
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question